2 Replies Latest reply on Jan 25, 2006 9:56 AM by Alexander Fedorenko

    Use of JBoss Logging Service - URGENT

    Ravi Prakash Reddy Ummadi Newbie

      Hi,

      I want to use log4j logging for my application.
      I have two options.
      - Use the existing logging service provided by jboss ( it essentially menas use the log4j instance created by jboss)
      - Use my own log4j service (create my own instance)

      I had a look into the following article which explains how to integrate jboss logging service into our application.

      http://www.jboss.org/wiki/Wiki.jsp?page=Logging

      My question is what is the advantage of using jboss logging service instead of our own. I require just 5 lines of code to initialize my own logging instance in the application , as shown below:

      
      
       InputStream fin = Thread.currentThread().getContextClassLoader().getResourceAsStream(mLogFile);
       Properties config = new Properties();
       config.load(fin);
       fin.close();
       mLogger = Logger.getLogger(LOG_NAME);
       PropertyConfigurator.configure(config
      
      
      


      While this is so simple task, why bothering about using jboss logging service? is there any performacne advantage?
      Even if I use jboss logging service, it is going to create seperate instance for my application logger category. Right?

      Please throw your thougts.

      -Ravi Prakash