RE: Confused about log4j error message

2002-12-06 Thread Justin Ashworth
See what happens if you capitalize the 'L' in rootLogger.

> -Original Message-
> From: Ryan Olson [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 06, 2002 6:34 PM
> To: [EMAIL PROTECTED]
> Subject: Confused about log4j error message
> 
> 
> Hi,
> 
> My apologies if this is a FAQ, but I haven't turned up 
> anything on Google and 
> it looks like the mailing list archive search is broken 
> (keeps saying "Text 
> search is not available for this list").
> 
> I'm using Struts 1.1b and Tomcat 4.0.4. The first thing on 
> stdout when I start 
> up my struts application is
> 
> log4j:WARN No appenders could be found for logger 
> (org.apache.struts.util.PropertyMessageResources).
> log4j:WARN Please initialize the log4j system properly.
> 
> Now, I've read lots of documentation and book chapters on 
> using log4j and I 
> can't figure out what I'm doing wrong. I've got a 
> commons-logging.properties 
> file with the entry org.apache.commons.logging.Log= 
> org.apache.commons.logging.impl.Log4JCategoryLog. I've got a 
> log4j.properties 
> file in WEB-INF/classes copied from the simple configuration in Chuck 
> Cavaness' Struts book, which is supposed to direct everything 
> to the console:
> 
> log4j.rootlogger=INFO, stdout 
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
> 
> I have the log4j and commons-logging jars in my WEB-INF/lib directory.
> 
> What happens is that I get the warnings described above, and 
> none of my log 
> messages, created with log.error(), are visible. I'm 99% sure 
> that my use of 
> commons-logging is not the problem, since I do see log 
> messages when I use 
> the JDK 1.4 logging instead.
> 
> Any ideas? Thanks
> 
> Ryan Olson
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Confused about log4j error message

2002-12-06 Thread Ryan Olson
Hi,

My apologies if this is a FAQ, but I haven't turned up anything on Google and 
it looks like the mailing list archive search is broken (keeps saying "Text 
search is not available for this list").

I'm using Struts 1.1b and Tomcat 4.0.4. The first thing on stdout when I start 
up my struts application is

log4j:WARN No appenders could be found for logger 
(org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.

Now, I've read lots of documentation and book chapters on using log4j and I 
can't figure out what I'm doing wrong. I've got a commons-logging.properties 
file with the entry org.apache.commons.logging.Log= 
org.apache.commons.logging.impl.Log4JCategoryLog. I've got a log4j.properties 
file in WEB-INF/classes copied from the simple configuration in Chuck 
Cavaness' Struts book, which is supposed to direct everything to the console:

log4j.rootlogger=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

I have the log4j and commons-logging jars in my WEB-INF/lib directory.

What happens is that I get the warnings described above, and none of my log 
messages, created with log.error(), are visible. I'm 99% sure that my use of 
commons-logging is not the problem, since I do see log messages when I use 
the JDK 1.4 logging instead.

Any ideas? Thanks

Ryan Olson


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Log4j Error

2002-03-20 Thread Pete Serafin

Thanks guys.  That did solve my problem and also explains why the example I copied 
from the documentation had rootLogger in it.  Had me a
little lost, but its working fine now.


Pete

Louis Leung wrote:

> use rootCategory if u r using log4j 1.1.3
> use rootLogger if u r using log4j 1.2 and onwards
>
> Steve Wilkinson wrote:
>
> > You need something like this.
> > log4j.rootCategory=ERROR, R
> >
> > I don't know the log4j.rootLogger is a valid property.  The "ERROR" tells it what 
>level to log and R tells it what appender to use.
> >
> > Hope that helps.
> >
> > - Original Message -
> > From: Pete Serafin
> > Sent: Tuesday, March 19, 2002 5:50 PM
> > To: [EMAIL PROTECTED]
> > Subject: Log4j Error
> >
> > I am having an issue with a log utility I have written wrapping some
> > log4j classes. Ive read through the samples and other threads, but cant
> > find a resolution ( which should be simple ).  My utility class sets up
> > a category initializes to root and executes a static method upon
> > creation as follows:
> >
> > public class log{
> >   ...
> >
> > static{
> > PropertyConfigurator.configure( "d:\\App\\WEB-
> > INF\\log4j.properties" );
> > }
> >
> > }
> >
> > I have placed my config file (log4j.properties) in the d:\App\WEB-INF\
> > directory. It is a basic config that looks as follows:
> >
> > log4j.rootLogger=ERROR, R
> >
> > #Create a rolling file
> > log4j.appender.R=org.apache.log4j.RollingFileAppender
> > log4j.appender.R.File=example.log
> >
> > # Keep 100 backup files of size 100kb
> > log4j.appender.R.MaxFileSize=100KB
> > log4j.appender.R.MaxBackupIndex=100
> >
> > log4j.appender.R.layout=org.apache.log4j.PatternLayout
> > log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
> >
> > The file seems to be read in properly, but I get the error:
> >
> >log4j:ERROR No appenders could be found for category (root).
> >log4j:ERROR Please initialize the log4j system properly.
> >
> > What am I missing?  Thanks,
> >
> > Pete Serafin
> >
> > --
> > To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Log4j Error

2002-03-20 Thread Louis Leung

use rootCategory if u r using log4j 1.1.3
use rootLogger if u r using log4j 1.2 and onwards

Steve Wilkinson wrote:

> You need something like this.
> log4j.rootCategory=ERROR, R
>
> I don't know the log4j.rootLogger is a valid property.  The "ERROR" tells it what 
>level to log and R tells it what appender to use.
>
> Hope that helps.
>
> - Original Message -
> From: Pete Serafin
> Sent: Tuesday, March 19, 2002 5:50 PM
> To: [EMAIL PROTECTED]
> Subject: Log4j Error
>
> I am having an issue with a log utility I have written wrapping some
> log4j classes. Ive read through the samples and other threads, but cant
> find a resolution ( which should be simple ).  My utility class sets up
> a category initializes to root and executes a static method upon
> creation as follows:
>
> public class log{
>   ...
>
> static{
> PropertyConfigurator.configure( "d:\\App\\WEB-
> INF\\log4j.properties" );
> }
>
> }
>
> I have placed my config file (log4j.properties) in the d:\App\WEB-INF\
> directory. It is a basic config that looks as follows:
>
> log4j.rootLogger=ERROR, R
>
> #Create a rolling file
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=example.log
>
> # Keep 100 backup files of size 100kb
> log4j.appender.R.MaxFileSize=100KB
> log4j.appender.R.MaxBackupIndex=100
>
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
>
> The file seems to be read in properly, but I get the error:
>
>log4j:ERROR No appenders could be found for category (root).
>log4j:ERROR Please initialize the log4j system properly.
>
> What am I missing?  Thanks,
>
> Pete Serafin
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Log4j Error

2002-03-19 Thread Pete Serafin

I am having an issue with a log utility I have written wrapping some 
log4j classes. Ive read through the samples and other threads, but cant 
find a resolution ( which should be simple ).  My utility class sets up 
a category initializes to root and executes a static method upon 
creation as follows:


public class log{
  ...

 static{
PropertyConfigurator.configure( "d:\\App\\WEB-
INF\\log4j.properties" );
 }

}


I have placed my config file (log4j.properties) in the d:\App\WEB-INF\ 
directory. It is a basic config that looks as follows:

log4j.rootLogger=ERROR, R

#Create a rolling file
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=example.log

# Keep 100 backup files of size 100kb
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=100

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n


The file seems to be read in properly, but I get the error:


   log4j:ERROR No appenders could be found for category (root).
   log4j:ERROR Please initialize the log4j system properly.


What am I missing?  Thanks,


Pete Serafin



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Log4j Error

2002-03-19 Thread Steve Wilkinson

You need something like this.
log4j.rootCategory=ERROR, R

I don't know the log4j.rootLogger is a valid property.  The "ERROR" tells it what 
level to log and R tells it what appender to use.

Hope that helps.

- Original Message -
From: Pete Serafin
Sent: Tuesday, March 19, 2002 5:50 PM
To: [EMAIL PROTECTED]
Subject: Log4j Error

I am having an issue with a log utility I have written wrapping some
log4j classes. Ive read through the samples and other threads, but cant
find a resolution ( which should be simple ).  My utility class sets up
a category initializes to root and executes a static method upon
creation as follows:


public class log{
  ...

static{
PropertyConfigurator.configure( "d:\\App\\WEB-
INF\\log4j.properties" );
}

}


I have placed my config file (log4j.properties) in the d:\App\WEB-INF\
directory. It is a basic config that looks as follows:

log4j.rootLogger=ERROR, R

#Create a rolling file
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=example.log

# Keep 100 backup files of size 100kb
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=100

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n


The file seems to be read in properly, but I get the error:


   log4j:ERROR No appenders could be found for category (root).
   log4j:ERROR Please initialize the log4j system properly.


What am I missing?  Thanks,


Pete Serafin



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>