I'm not sure what you are trying to accomplish with resetting the
levels on the logger, but clearly you have not configured Log4j
before attempting to log. The simplest thing to do is include a
Log4j config file (log4j.properties or log4j.xml) in the root of the
classpath (otherwise known as the "default package") and you are all set.
Jake
At 05:33 AM 4/20/2006, you wrote:
>
>
>
>I am using struts1.2.8 with hibernate 3.
>
>I am getting below error.
>Is there any solution for this problem ?
>----------------------------------------------------
>private DailyRollingFileAppender cAeroAppender;
> java.util.Calendar cal=java.util.Calendar.getInstance(); // getting
>calendar instance
> logger = Logger.getLogger(cal.getTime()+"");
>
>
>strLogLevel=CAeroConstants.getProperty(CAeroConstants.PROPTYPE_CONFIG,CAeroC
>onstants.CONFIGPROP_LOG_LEVEL);
> logger.setLevel(Level.DEBUG);
> }
> else if (
strLogLevel.equalsIgnoreCase("DEBUG") ) {
> logger.setLevel(Level.DEBUG);
> }
> else if (
strLogLevel.equalsIgnoreCase("ERROR") ) {
> logger.setLevel(Level.ERROR);
> }
>
>
> cAeroAppender = new
DailyRollingFileAppender(new
>SimpleLayout(),strLogPath+".log","'_'MM-dd-yyyy");
> logger.addAppender(cAeroAppender);
>
>-----------------------------
>
>
>06/04/18 20:50:01 log4j:WARN No appenders could be found for logger
>(org.apache.struts.util.PropertyMessageResource
>s).
>06/04/18 20:50:01 log4j:WARN Please initialize the log4j system properly.
>---------------------------------
>Raghu
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]