You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Sv...@GAD.de on 2002/08/26 08:43:55 UTC
problem logging the whole stack of my own Exception
Hello,
I planed to use Log4J for my applikation but I got a problem by logging the
whole stack of my own Exception.
For excample:
I wrote an exceptionclass extending exception. The construktor expacts a
parentexception as a parameter. And finally I overwrote the method
printStackTrace to get both the parentexception and my own exception in one
stacktrace.
Like this:
public class WQException extends Exception
{
private Exception parent = null;
public WQException(String s, Exception parent)
{
super(s);
this.parent=parent;
}
public void printStackTrace()
{
super.printStackTrace(s);
if ( parent != null )
{
s.println("nested Exception is:");
parent.printStackTrace(s);
}
}
}
So a stacktrace should look like this:
info.jankus.webquicky.exception.WQException: Auf das Feld "vorname" kann
nicht zugegriffen werden!
at info.jankus.webquicky.test.Test1.getTest(Test1.java:38)
at info.jankus.webquicky.WQStart.main(WQStart.java:57)
nested Exception is:
java.lang.IllegalArgumentException: object is not an instance of
declaring class
at info.jankus.webquicky.test.Test1.getTest(Test1.java:34)
at info.jankus.webquicky.WQStart.main(WQStart.java:57)
But when I use Log4J for logging the Error - e.g.: log.error("Folgender
Fehler ist aufgetreten",e); - the result looks like this:
[ ERROR ] info.jankus.webquicky:63 <2002-08-23 12:09:42,670>
Folgender Fehler ist aufgetreten
info.jankus.webquicky.exception.WQException: Auf das Feld "vorname" kann
nicht zugegriffen werden!
at info.jankus.webquicky.test.Test1.getTest(Test1.java:38)
at info.jankus.webquicky.WQStart.main(WQStart.java:57)
I'm very disapointed that log4j is not calling the specific
printStackTrace-method of my own exception and about the loss of
information.
Does anybody has an idea for a fix, workaround or is there something wrong
with my code...?
Thanks in advance
Sven
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: problem configuring Log4j for Weblogic 6.1
Posted by sudhendra seshachala <su...@yahoo.com>.
Got this working. Atleast the messages are displayed
on console and the file.
How to change the conversion layout to configure time
as follows on console and file as well
Desired: 8/25/02 1:49:31 PM
Current Conversion
log4j.debug=true
#log4j.disable=fatal
log4j.additivity.epeople=true
log4j.rootCategory=DEBUG,stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%t]
%-5p %c - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=c:/bea/wlserver6.1/config/sudhendras/logs/epeople.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.R.layout.ConversionPattern=%d [%t] %-5p
%c - %m%n
log4j.logger.epeople=DEBUG
Pls help.
thanks
sudhi
--- sudhendra seshachala <su...@yahoo.com> wrote:
> So, can i configure the properties as follows, this
> would ensure that configuration is done before using
> log4j.
>
>
> public class Logger
> {
> // a private logger to log error messages during
> Logger operations
> private static org.apache.log4j.Logger
> s_localLogger
> =
>
> org.apache.log4j.Logger.getLogger(Logger.class);
>
> // default resource bundle location
> private static final String
> DEFAULT_RESOURCE_BUNDLE = "Log";
>
> // log4j category for this logger
> private org.apache.log4j.Logger m_logger = null;
>
>
> // This can be externalized through LogResources
> private static final String EXCEPTION_LOG
> ="Check
> the Stack Trace";
>
> /**
> * Cannot be instantiated directly - use
> getLogger().
> */
> private Logger(org.apache.log4j.Logger c)
> {
> Properties nwp = NWProperties.getInstance();
> Logger.init(nwp, null);
> m_logger = c;
> }....
> }
> --- Ceki G�lc� <ce...@qos.ch> wrote:
> >
> > 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� <ce...@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>
>
=== message truncated ===
=====
God Bless America
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: problem configuring Log4j for Weblogic 6.1
Posted by sudhendra seshachala <su...@yahoo.com>.
So, can i configure the properties as follows, this
would ensure that configuration is done before using
log4j.
public class Logger
{
// a private logger to log error messages during
Logger operations
private static org.apache.log4j.Logger s_localLogger
=
org.apache.log4j.Logger.getLogger(Logger.class);
// default resource bundle location
private static final String
DEFAULT_RESOURCE_BUNDLE = "Log";
// log4j category for this logger
private org.apache.log4j.Logger m_logger = null;
// This can be externalized through LogResources
private static final String EXCEPTION_LOG ="Check
the Stack Trace";
/**
* Cannot be instantiated directly - use
getLogger().
*/
private Logger(org.apache.log4j.Logger c)
{
Properties nwp = NWProperties.getInstance();
Logger.init(nwp, null);
m_logger = c;
}....
}
--- Ceki G�lc� <ce...@qos.ch> wrote:
>
> 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� <ce...@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.
>
=== message truncated ===
=====
God Bless America
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: problem configuring Log4j for Weblogic 6.1
Posted by sudhendra seshachala <su...@yahoo.com>.
Why cant I see debuging statements while parsing
log4j.properties, even after setting log4j.debug=
true.
Can anyone help me on this.
thanks
sudhi
--- Ceki G�lc� <ce...@qos.ch> wrote:
>
> 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� <ce...@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.
>
=== message truncated ===
=====
God Bless America
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: problem configuring Log4j for Weblogic 6.1
Posted by sudhendra seshachala <su...@yahoo.com>.
Just works fine. Awesome..
thanks
sudhi
--- Ceki G�lc� <ce...@qos.ch> wrote:
>
> 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� <ce...@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.
>
=== message truncated ===
=====
God Bless America
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: problem configuring Log4j for Weblogic 6.1
Posted by Ceki Gülcü <ce...@qos.ch>.
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ü <ce...@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: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
--
Ceki
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: problem configuring Log4j for Weblogic 6.1
Posted by sudhendra seshachala <su...@yahoo.com>.
I am loading this property file before doing anything
else. This is the first thing being loaded.
thanks
sudhi
--- Ceki G�lc� <ce...@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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: problem configuring Log4j for Weblogic 6.1
Posted by Ceki Gülcü <ce...@qos.ch>.
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
>epeople -
>
>126263 [ExecuteThread: '5' for queue: 'default'] INFO
>epeople -
>
>126273 [ExecuteThread: '5' for queue: 'default'] INFO
>epeople -
>
>126273 [ExecuteThread: '5' for queue: 'default'] INFO
>epeople -
>
>126273 [ExecuteThread: '5' for queue: 'default'] INFO
>epeople -
>
>126283 [ExecuteThread: '5' for queue: 'default'] INFO
>epeople -
>
>
>can anyone help me on this... pls.....
>
>sudhi
>
>
>
>
>=====
>God Bless America
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Finance - Get real-time stock quotes
>http://finance.yahoo.com
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
--
Ceki
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
problem configuring Log4j for Weblogic 6.1
Posted by sudhendra seshachala <su...@yahoo.com>.
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
epeople -
126263 [ExecuteThread: '5' for queue: 'default'] INFO
epeople -
126273 [ExecuteThread: '5' for queue: 'default'] INFO
epeople -
126273 [ExecuteThread: '5' for queue: 'default'] INFO
epeople -
126273 [ExecuteThread: '5' for queue: 'default'] INFO
epeople -
126283 [ExecuteThread: '5' for queue: 'default'] INFO
epeople -
can anyone help me on this... pls.....
sudhi
=====
God Bless America
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: problem logging the whole stack of my own Exception
Posted by Ceki Gülcü <ce...@qos.ch>.
At 08:43 26.08.2002 +0200, you wrote:
>Hello,
>
>I planed to use Log4J for my applikation but I got a problem by logging the
>whole stack of my own Exception.
>
>For excample:
>I wrote an exceptionclass extending exception. The construktor expacts a
>parentexception as a parameter. And finally I overwrote the method
>printStackTrace to get both the parentexception and my own exception in one
>stacktrace.
>
>Like this:
>
> public class WQException extends Exception
> {
> private Exception parent = null;
>
> public WQException(String s, Exception parent)
> {
> super(s);
> this.parent=parent;
> }
>
> public void printStackTrace()
> {
> super.printStackTrace(s);
> if ( parent != null )
> {
> s.println("nested Exception is:");
> parent.printStackTrace(s);
> }
> }
> }
The above code does not compile. Please provide code that compiles so that
we can discuss it.
--
Ceki
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>