logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: problem configuring Log4j for Weblogic 6.1
Date Mon, 26 Aug 2002 15:31:38 GMT

The warning message says otherwise.

At 08:25 26.08.2002 -0700, you wrote:
>I am loading this property file before doing anything
>else. This is the first thing being loaded.
>
>thanks
>sudhi
>--- Ceki Gülcü <ceki@qos.ch> wrote:
> >
> >
> > It looks that log4j is configured using your
> > configuration file. However,
> > you or some other code is attempting to use log4j
> > prior to its
> > configuration, hence the warning message.
> >
> > At 07:20 26.08.2002 -0700, you wrote:
> >
> > >Hi All,
> > >I am having problems configuring log4j with
> > Weblogic
> > >6.1.
> > >I have the configuration for log4j as follows in a
> > >file called generic properties which get loaded by
> > a
> > >startup class
> > >
> > >
> >
> >############################################################################
> > ># log4j configuration
> >
> >############################################################################
> > >
> > >log4j.debug=true
> > >#log4j.disable=fatal
> > >log4j.additivity.epeople=true
> > >
> > >log4j.rootCategory=DEBUG,stdout, R
> >
> >log4j.appender.R=org.apache.log4j.RollingFileAppender
> >
> >log4j.appender.R.File=c:/bea/wlserver6.1/config/sudhendras/logger.log
> > >log4j.appender.R.MaxFileSize=100KB
> > >log4j.appender.R.MaxBackupIndex=1
> >
> >log4j.appender.R.layout=org.apache.log4j.PatternLayout
> > >log4j.appender.R.layout.ConversionPattern=%d %-5p
> > >%c{1} %M - %m%n
> >
> >log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> >
> >log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> > >
> > >log4j.logger.epeople=DEBUG
> > >
> > >These properties gets loaded as a properties in
> > >startup class as follows.
> > >
> > >import java.io.*;
> > >
> > >import java.util.Properties;
> > >import org.apache.log4j.xml.DOMConfigurator;
> > >import org.apache.log4j.*;
> > >import weblogic.common.*;
> > >
> > >import com.epeople.config.*;
> > >
> > >/**
> > >  * Insert the type's description here.
> > >  * Creation date: (12/5/00 11:12:13 AM)
> > >  * @author: Administrator
> > >  */
> > >public class ApacheLoggerStartUp implements
> > >weblogic.common.T3StartupDef {
> > >         /**
> > >         * ApacheLoggerStartUp constructor comment.
> > >         */
> > >         private static final String
> > m_logConfigurationFile
> > >="c:\\ep\\properties\\log4j.properties";
> > >         public ApacheLoggerStartUp()
> > >         {
> > >                 super();
> > >         }
> > >         /**
> > >         * setServices method comment.
> > >         */
> > >         public void
> > setServices(weblogic.common.T3ServicesDef
> > >arg1) {
> > >         }
> > >         /**
> > >         * startup method comment.
> > >         */
> > >         public String startup(String arg1,
> > >java.util.Hashtable prop) throws Exception
> > >         {
> > >                 String resource = null;
> > >                 try
> > >                 {
> > >                     Properties props
> > =NWProperties.getInstance();
> > >                     Logger.init(props,null);
> > >                     return "Log4j configuration
> > initialized.";
> > >
> > >                 }
> > >                 catch (Exception e)
> > >                 {
> > >                    System.out.println("Cannot open
> > config file: " +
> > >resource);
> > >                    return "Log4j configuration
> > failed to
> > >initialized.";
> > >
> > >                 }
> > >         }
> > >}
> > >
> > >can anyone help me on this.
> > >I get the most dreaded
> > >"log4j:WARN No appenders could be found for logger
> > >(epeople).
> > >log4j:WARN Please initialize the log4j system
> > >properly."
> > >
> > >The sample output is as follows
> > >Starting WebLogic Server ....
> > ><Aug 26, 2002 7:14:32 AM PDT> <Notice> <Management>
> > ><Loading configuration file
> > >.\config\sudhendras\config.xml ...>
> > ><Aug 26, 2002 7:14:36 AM PDT> <Notice>
> > ><WebLogicServer> <Starting WebLogic Admin
> > >  Server "sudhendrasAdmin" for domain "sudhendras">
> > >log4j:WARN No appenders could be found for logger
> > >(epeople).
> > >log4j:WARN Please initialize the log4j system
> > >properly.
> > ><Aug 26, 2002 7:14:57 AM PDT> <Notice> <Management>
> > ><Application Poller started
> > >for development server.>
> > >log4j: Parsing for [root] with value=[DEBUG,stdout,
> > R
> > >].
> > >log4j: Level token is [DEBUG].
> > >log4j: Category root set to DEBUG
> > >log4j: Parsing appender named "stdout".
> > >log4j: Parsing layout options for "stdout".
> > >log4j: End of parsing for "stdout".
> > >log4j: Parsed "stdout" options.
> > >log4j: Parsing appender named "R".
> > >log4j: Parsing layout options for "R".
> > >log4j: Setting property [conversionPattern] to [%d
> > >%-5p %c{1} %M - %m%n].
> > >log4j: End of parsing for "R".
> > >log4j: Setting property [file] to
> > >[c:/bea/wlserver6.1/config/sudhendras/epeople.
> > >log].
> > >log4j: Setting property [maxBackupIndex] to [1].
> > >log4j: Setting property [maxFileSize] to [100KB].
> > >log4j: setFile called:
> > >c:/bea/wlserver6.1/config/sudhendras/epeople.log,
> > true
> > >log4j: setFile ended
> > >log4j: Parsed "R" options.
> > >log4j: Parsing for [epeople] with value=[DEBUG].
> > >log4j: Level token is [DEBUG].
> > >log4j: Category epeople set to DEBUG
> > >log4j: Handling log4j.additivity.epeople=[true]
> > >log4j: Setting additivity for "epeople" to true
> > >log4j: Finished configuring.
> > ><Aug 26, 2002 7:14:58 AM PDT> <Notice>
> > ><WebLogicServer> <ListenThread listening
> > >on port 80>
> > ><Aug 26, 2002 7:14:58 AM PDT> <Notice>
> > ><WebLogicServer> <SSLListenThread listeni
> > >ng on port 443>
> > ><Aug 26, 2002 7:14:59 AM PDT> <Notice>
> > ><WebLogicServer> <Started WebLogic Admin
> > >Server "sudhendrasAdmin" for domain "sudhendras"
> > >running in Development Mode>
> > >
> > >126233 [ExecuteThread: '5' for queue: 'default']
> > INFO
> > >epeople  -
> > >
> > >126243 [ExecuteThread: '5' for queue: 'default']
> > INFO
> > >epeople  -
> >
> >BGTRIGGERCREATION-TaskSchedlerMaintenaceTrigger().trigger()
> > >- Going to synchroni
> > >zeTriggers with ThreadThread[ExecuteThread: '5' for
> > >queue: 'default',5,Thread Gr
> > >oup for Queue: 'default']
> > >126243 [ExecuteThread: '5' for queue: 'default']
> > DEBUG
> > >epeople  - BGTRIGGERCREAT
> > >ION-TaskSchedlerMaintenaceTrigger().trigger() -
> > Going
> > >to synchronizeTriggers wit
> > >h ThreadThread[ExecuteThread: '5' for queue:
> > >'default',5,Thread Group for Queue:
> > >  'default']
> > >
> > >126263 [ExecuteThread: '5' for queue: 'default']
> > INFO
> > >epeople  -
> > >
> > >126263 [ExecuteThread: '5' for queue: 'default']
> > INFO
> > >epeople  -
> > >
> > >126263 [ExecuteThread: '5' for queue: 'default']
> > INFO
> >
>=== message truncated ===
>
>
>=====
>God Bless America
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Finance - Get real-time stock quotes
>http://finance.yahoo.com
>
>--
>To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

--
Ceki


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message