You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tomcat Random <to...@gmail.com> on 2013/12/03 19:12:16 UTC

Logging makes a grown man cry

Environment is RHEL6, Tomcat 7.0.42. There is only one webapp.

I'm trying to implement log4j as per the instructions here (skipping step
5):
http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j

Since I'm not using the Manager, I've removed the relevant logging lines
from CATALINA_HOME/lib/log4j.properties, so it looks like this:

_____________________________
log4j.rootLogger=INFO, CATALINA

# Define all the appenders
log4j.appender.CATALINA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.CATALINA.File=${catalina.base}/logs/catalina.
log4j.appender.CATALINA.Append=true
log4j.appender.CATALINA.Encoding=UTF-8
# Roll-over the log once per day
log4j.appender.CATALINA.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
log4j.appender.CATALINA.layout.ConversionPattern = %d [%t] %-5p %c- %m%n

log4j.appender.LOCALHOST=org.apache.log4j.DailyRollingFileAppender
log4j.appender.LOCALHOST.File=${catalina.base}/logs/localhost.
log4j.appender.LOCALHOST.Append=true
log4j.appender.LOCALHOST.Encoding=UTF-8
log4j.appender.LOCALHOST.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.LOCALHOST.layout = org.apache.log4j.PatternLayout
log4j.appender.LOCALHOST.layout.ConversionPattern = %d [%t] %-5p %c- %m%n

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Encoding=UTF-8
log4j.appender.CONSOLE.layout = org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern = %d [%t] %-5p %c- %m%n

# Configure which loggers log to which appenders
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=INFO,
LOCALHOST
_____________________________

On restart, my (deleted-beforehand) logs directory looks like this:

/logs/catalina.
/logs/catalina.2013-12-03.log
/logs/catalina.out
/logs/cluster.2013-12-03.log
/logs/localhost.
/logs/localhost_access_log.2013-12-03.txt
_____________________________

Ok, so this isn't what I want. First there are three "catalina*" files.
Each has different aspects of my app and/or server.

The "catalina." file has info about NIO, the deltamanager, as well as my
application logging code (e.g.,logger.warn("hello world");).

"catalina.2013-12-03.log" has a few lines about starting and stopping the
server like:
"A valid shutdown command was received via the shutdown port. Stopping the
Server instance."

"catalina.out" has spymemcached logging info (I haven't changed the
spymemcached  system property yet to log4j so that might be why).

"cluster.2013-12-03.log" is behaving normally. "localhost." is empty. And
the daily access log is good.

So, all I want is to have:

1. one log file that rolls daily (a new file each day), with the date
appended, that catches my own logging code in the app, based on a global
logging level value that I can change (DEBUG, or INFO, or ERROR etc) as
needed.

2. Another log file that rolls daily and consolidates any other output of
the server and app (or two separate files) and also has a logging level
value that can be changed globally.

3. Get rid of the empty localhost. file.

MTIA,
Alec

Re: Logging makes a grown man cry

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Alec,

On 12/3/13, 1:12 PM, Tomcat Random wrote:
> I'm trying to implement log4j as per the instructions here
> (skipping step 5): 
> http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j
> 
> Since I'm not using the Manager, I've removed the relevant logging
> lines from CATALINA_HOME/lib/log4j.properties, so it looks like
> this:
> 
> _____________________________ log4j.rootLogger=INFO, CATALINA
> 
> # Define all the appenders 
> log4j.appender.CATALINA=org.apache.log4j.DailyRollingFileAppender 
> log4j.appender.CATALINA.File=${catalina.base}/logs/catalina.

This appender creates the "catalina." file, so you are doing this to
yourself.

> log4j.appender.CATALINA.DatePattern='.'yyyy-MM-dd'.log'

This will move "catalina." to "catalina..yyyy-MM-dd.log" every time
the date rolls over (actually, when the first log from the following
day is written). So, you are creating "catalina..yyyy-MM-dd.log" yourself.

"catalina.out" is impossible to avoid, because stdout *must* go
somewhere. If you want, you can set CATALINA_OUT to /dev/null but then
you might miss crucial log messages.

> log4j.appender.LOCALHOST=org.apache.log4j.DailyRollingFileAppender 
> log4j.appender.LOCALHOST.File=${catalina.base}/logs/localhost.

You are creating this file. If you don't send any log messages to it,
that's your fault. If you don't want it, don't configure it.

> _____________________________
> 
> On restart, my (deleted-beforehand) logs directory looks like
> this:
> 
> /logs/catalina. /logs/catalina.2013-12-03.log /logs/catalina.out 
> /logs/cluster.2013-12-03.log /logs/localhost. 
> /logs/localhost_access_log.2013-12-03.txt 
> _____________________________

I would have expected your filenames to contain two sequential dots
before the dates because your ".File" property ends with a dot and
your ".DatePattern" begins with a dot.

> "catalina.out" has spymemcached logging info (I haven't changed
> the spymemcached  system property yet to log4j so that might be
> why).

It's also possible that spymemcached is writing directly to System.out
(or System.err). You might want to check on that. Or it may be logging
to ServletContext.log().

> "cluster.2013-12-03.log" is behaving normally. "localhost." is
> empty. And the daily access log is good.

Odd... as you have not configured such a log about. That must be
happening elsewhere.

> So, all I want is to have:
> 
> 1. one log file that rolls daily (a new file each day), with the
> date appended, that catches my own logging code in the app, based
> on a global logging level value that I can change (DEBUG, or INFO,
> or ERROR etc) as needed.

You cannot avoid catalina.out unless you do something dumb like
sending stdout to /dev/null.

> 2. Another log file that rolls daily and consolidates any other
> output of the server and app (or two separate files) and also has a
> logging level value that can be changed globally.

No problem. What you have above should work for that.

> 3. Get rid of the empty localhost. file.

Just remove the configuration for the LOCALHOST appender and that will
solve this problem.

As Konstantin suggested, you should read the documentation for log4j.
What is in the Tomcat documentation is just a suggestion to get you
started.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSn2inAAoJEBzwKT+lPKRYRq0P/RcofIzrFYmLCL+lm8H93p8J
9Efs0JgeSA0YctejCN/p3bBNFC6NkcG1ZVQ9txoksFbzEIbJU/WrfUS7FUZgPaw+
e2f+5BW90aIxKK7PkCA1opJVKj3jhIxTix9egQJrfoIGlZ+iuqkeHpevtYN8z5Dt
pcuwlq3/+r38Vh+NnaxcCBlniigja/q4u4KW9eH00XHXSRCL6Rf7labldxVf3Klf
V+hlAUimmejQ2IYYYMYuE8thcjiEPwzDPe+IMmWcy4l07jOPzFWdKMYR1HD9THo/
agW9iimx+4sC4UJn03GZ8ndEmPj6ShFS0wHcvyQWinAKqMZ9UyKqRM4YPgpJkHFu
Uhct6JAGhteZ02uSPynw6PZu6cfIcB50QR+Bf0c9/v+lJZJ/WQFhZspcCTawwMDr
hzgu9Mp4ZHYVjneOQ0pFHmV8ZcoNlXlxdjntH0JoPEj4giPzJQnW80LLQ73TftPJ
GP3swzGFZF2sLBV5fG3Faeww4wL4zhz64fKf/6r6C3nGj8/SORA+msSF4/ySr51i
jWOcuiCsjul/PDAC+cTsBOyKXJQsJZ/99p+5qeUb1wkldbI35mWUZwh1lVGQs8Pc
/kkWRESajL35kZJ7h9LXLtFt3rYtKQKzgJ9Tfvgd5zjhvLPLWxfNSTNZPl6Ys93L
xaFsE9WOURRSa/FcmeCp
=JQo2
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Logging makes a grown man cry

Posted by Tomcat Random <to...@gmail.com>.
Sorry if resurrecting the dead is frowned upon here but I thought I would
just add my resolve to this. Honestly, after writing a lot of code
otherwise, logging was probably the most frustrating.

Tomcat 7.0.42, RHEL 6

1. SL4FJ with Logback works beautifully.

2. I have custom error pages in web.xml that redirect various exceptions to
servlets. The servlets capture the exceptions and write them out to
different logs using SLF/Logback.

3. The default logging.properties is completely commented out. Note:
deleting it is different than it being empty.

4. Since spymemcached logging is baked in, I added SLF as its logger in my
ContextInitialized listener:

 // set SLF4J as the logger for spymemcached
 Properties systemProperties = System.getProperties();
systemProperties.put("net.spy.log.LoggerImpl",
"net.spy.memcached.compat.log.SLF4JLogger");
System.setProperties(systemProperties);

ch.qos.logback.classic.Logger logger =
         (ch.qos.logback.classic.Logger)
LoggerFactory.getLogger("net.spy.memcached");

logger.setLevel(Level.ERROR);


Cheers,
Alec

RE: Logging makes a grown man cry

Posted by Dale Ogilvie <Da...@trimble.com>.
Alec: "That seems like a good solution. Are you able to avoid having a
single giant catalina.out file in $CATALINA_HOME/logs?"

No, we find we can live with that but we try to minimise writes to
stdout etc.  From Chris's note it seems like the ideal solution for us
would be

1. server log4j isolated in server class loader
2. log4j in each webapp as well

But just using standard tomcat logging for the server works adequately
for us too.

Dale


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Logging makes a grown man cry

Posted by Tomcat Random <to...@gmail.com>.
That seems like a good solution. Are you able to avoid having a single
giant catalina.out file in $CATALINA_HOME/logs?


On Tue, Dec 3, 2013 at 11:01 PM, Dale Ogilvie <Da...@trimble.com>wrote:

> Currently we use tomcat configured as out-of-the-box for logging (no
> log4j) and log4j.jar and config in the app war file.
>
> We found issues with trying to have log4j in catalina/lib.
>
> That said, it would be nice to use log4j for tomcat, however we found
> that the two configurations collided in our slf4j setup.
>
> Dale
>
> -----Original Message-----
> From: Tomcat Random [mailto:tomcat.random@gmail.com]
> Sent: Wednesday, 4 December 2013 7:12 a.m.
> To: Tomcat Users List
> Subject: Logging makes a grown man cry
>
> So, all I want is to have:
>
> 1. one log file that rolls daily (a new file each day), with the date
> appended, that catches my own logging code in the app, based on a global
> logging level value that I can change (DEBUG, or INFO, or ERROR etc) as
> needed.
>
> 2. Another log file that rolls daily and consolidates any other output
> of the server and app (or two separate files) and also has a logging
> level value that can be changed globally.
>
> 3. Get rid of the empty localhost. file.
>
> MTIA,
> Alec
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Logging makes a grown man cry

Posted by Dale Ogilvie <Da...@trimble.com>.
>> Dale wrote:
>> We found issues with trying to have log4j in catalina/lib.
>> 
>> That said, it would be nice to use log4j for tomcat, however we found 
>> that the two configurations collided in our slf4j setup.

>You can do this if you put log4j.jar into a server-only ClassLoader.
>That's not configured by default in Tomcat 6+. We should add documentation to show how that can be done, because conflicting loggers are a total pain.

>- -chris

Thanks for that tip.

Dale


Re: Logging makes a grown man cry

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dale,

On 12/3/13, 11:01 PM, Dale Ogilvie wrote:
> Currently we use tomcat configured as out-of-the-box for logging
> (no log4j) and log4j.jar and config in the app war file.
> 
> We found issues with trying to have log4j in catalina/lib.
> 
> That said, it would be nice to use log4j for tomcat, however we
> found that the two configurations collided in our slf4j setup.

You can do this if you put log4j.jar into a server-only ClassLoader.
That's not configured by default in Tomcat 6+. We should add
documentation to show how that can be done, because conflicting
loggers are a total pain.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSn2oqAAoJEBzwKT+lPKRYHccQAK32B5PG94nKGWv9/Ml4vmRg
UnsHGM1ThTb/CO7r1/Z0sZvuNVP+F+4S/il5dZ+pVftn00mBPmeSIYqjthsSgfg7
yYt2FQOLyk0fJjfcMCeXzPXMzxVSpQqGbaKkYYUXsufxHBWNJQImNQJh8HnB3kf8
koP0Y7WajN+cg5P+asHWsdwMeRHpieZmjytv3QHLdjgfnfbrLXAF3d5JmBA1pi5l
H4VTxHEDCPmejqNCRNdpD1ofdJDBScZXjMB5gvtVszQiYZYynfl/HTeMt5YrcFvo
QV0pdgK4hHlLz8TzZG04bmo+GfA1jSvy2x7yLXDKKV6DllnHGGRMpvY6qSEU62Yu
j24rHuPAUC26y3LYM5yK6IJaWnPtUYV9pHw+JHZRIEo1pIhrGLg3RboVase4SQb0
soqh4V8TcZ/bnzOklYB6fubP1vbTzWZx/kb3OhbOUTVFVPI9IEtmjezfxXurKVLK
4sEkOH8Xe1fVvMcTPx+cMcFn51e5HsxIIO6Vgjbzi8zXp+x51Tg57oZAlWsjacC1
ddqB24Sknb6gd8KeCEH3mI2IwzmzJSN8q0UZnOldfl4JD75s+R3eeu4Pg8jPiaaz
UA/CbcxBf5cXgnaYt6QWiAYuSOTFPuLJ34m9LXL5HfxiU3ZaciPGaT+7qCws0ID7
4v+Wul2gIGHJ1mqyCgcX
=a6/R
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Logging makes a grown man cry

Posted by Dale Ogilvie <Da...@trimble.com>.
Currently we use tomcat configured as out-of-the-box for logging (no
log4j) and log4j.jar and config in the app war file.

We found issues with trying to have log4j in catalina/lib.

That said, it would be nice to use log4j for tomcat, however we found
that the two configurations collided in our slf4j setup. 

Dale

-----Original Message-----
From: Tomcat Random [mailto:tomcat.random@gmail.com] 
Sent: Wednesday, 4 December 2013 7:12 a.m.
To: Tomcat Users List
Subject: Logging makes a grown man cry

So, all I want is to have:

1. one log file that rolls daily (a new file each day), with the date
appended, that catches my own logging code in the app, based on a global
logging level value that I can change (DEBUG, or INFO, or ERROR etc) as
needed.

2. Another log file that rolls daily and consolidates any other output
of the server and app (or two separate files) and also has a logging
level value that can be changed globally.

3. Get rid of the empty localhost. file.

MTIA,
Alec

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Logging makes a grown man cry

Posted by Tomcat Random <to...@gmail.com>.
Chris,

"The examples don't meet your needs exactly? Well, I'm sure we're all
terribly sorry about that."

Heh...Sorry, I was responding to Konstantin's comment and mine crossed over
just before your long and helpful reply.

Thanks, as always,
Alec



On Wed, Dec 4, 2013 at 12:39 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Alec,
>
> On 12/4/13, 11:31 AM, Tomcat Random wrote:
> > I'd argue that dealing with logging configuration is not newbie
> > stuff. This is probably some of the most poorly implemented
> > technology in the servlet container.
>
> What about the implementation is poor?
>
> The examples don't meet your needs exactly? Well, I'm sure we're all
> terribly sorry about that.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.15 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJSn2jYAAoJEBzwKT+lPKRYsaIQAJfcFaOJU1r4+fFUywSBkVWC
> i8zi+HHJjk+eUpWBXZ2EsNnkNMvFkOGUiUZCbtjCCXfUOPhLSxpizj9XSJT6HKlR
> Asto5xPhyouCjnfU+/L5fRdqi2yJeRf7D1nTnLoeVbmBX5BzkG5M6Ni+PG1/r50P
> M+ZsfHHajmnLmD6IIysgjzc68RsJDb/cPShpgBi7X0cMY9831tE+cx/Dj6KcyBBo
> Wm070JNBEn6+y9L4bHr1WOM9m3Cr9QPdDBIG8X/1M7unAEe5lU+8kfBpKlIuMOZH
> FhnrhkziuSOTKssm97Bo1wIEw71ddaEBejEj3sc6fimwMl7osT3RYU5xuR0Evq6/
> pICSgwSX9Cnv84JAeHb96KJCJ8ahGOrZaCAm0lQ4hhwQjD0097kXwx31BQBIRzAt
> bgfPFGNGoeXuzNCwfvKUW1N77g+Y6pjW1rFUu8Z725j8XNttFCsxtDSPErRfG5ti
> k9XKbS5zUVC4W/E7eQduUMQZ4XLV03+bpXl/Idou7anZjP0cqgbzil48ifTP3Ckt
> me3d5ahUlYdJZ6ZW8JrW9+uomfN9egFItDaZm3Ro284nJjl8MVXulwKaPJs7KT1C
> p4ox1UrnEo/03vs0qeWBxFwSsjfY3YW6+RCF2j16wCrHX+Im4MzptOztUrozWNCU
> 9S5L6y3U2UQ+O/jUBfJn
> =f194
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Logging makes a grown man cry

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Alec,

On 12/4/13, 11:31 AM, Tomcat Random wrote:
> I'd argue that dealing with logging configuration is not newbie
> stuff. This is probably some of the most poorly implemented
> technology in the servlet container.

What about the implementation is poor?

The examples don't meet your needs exactly? Well, I'm sure we're all
terribly sorry about that.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSn2jYAAoJEBzwKT+lPKRYsaIQAJfcFaOJU1r4+fFUywSBkVWC
i8zi+HHJjk+eUpWBXZ2EsNnkNMvFkOGUiUZCbtjCCXfUOPhLSxpizj9XSJT6HKlR
Asto5xPhyouCjnfU+/L5fRdqi2yJeRf7D1nTnLoeVbmBX5BzkG5M6Ni+PG1/r50P
M+ZsfHHajmnLmD6IIysgjzc68RsJDb/cPShpgBi7X0cMY9831tE+cx/Dj6KcyBBo
Wm070JNBEn6+y9L4bHr1WOM9m3Cr9QPdDBIG8X/1M7unAEe5lU+8kfBpKlIuMOZH
FhnrhkziuSOTKssm97Bo1wIEw71ddaEBejEj3sc6fimwMl7osT3RYU5xuR0Evq6/
pICSgwSX9Cnv84JAeHb96KJCJ8ahGOrZaCAm0lQ4hhwQjD0097kXwx31BQBIRzAt
bgfPFGNGoeXuzNCwfvKUW1N77g+Y6pjW1rFUu8Z725j8XNttFCsxtDSPErRfG5ti
k9XKbS5zUVC4W/E7eQduUMQZ4XLV03+bpXl/Idou7anZjP0cqgbzil48ifTP3Ckt
me3d5ahUlYdJZ6ZW8JrW9+uomfN9egFItDaZm3Ro284nJjl8MVXulwKaPJs7KT1C
p4ox1UrnEo/03vs0qeWBxFwSsjfY3YW6+RCF2j16wCrHX+Im4MzptOztUrozWNCU
9S5L6y3U2UQ+O/jUBfJn
=f194
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Logging makes a grown man cry

Posted by Tomcat Random <to...@gmail.com>.
I'd argue that dealing with logging configuration is not newbie stuff. This
is probably some of the most poorly implemented technology in the servlet
container.


On Tue, Dec 3, 2013 at 3:44 PM, Konstantin Kolinko
<kn...@gmail.com>wrote:

> 2013/12/3 Tomcat Random <to...@gmail.com>:
> > Environment is RHEL6, Tomcat 7.0.42. There is only one webapp.
> >
> > I'm trying to implement log4j as per the instructions here (skipping step
> > 5):
> > http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j
> >
> > Since I'm not using the Manager, I've removed the relevant logging lines
> > from CATALINA_HOME/lib/log4j.properties, so it looks like this:
> >
> > _____________________________
> > log4j.rootLogger=INFO, CATALINA
> > (...)
>
> > 1., 2.
>
> Either filter by category names, or bundle its own
> classloader-specific Log4J configuration with your own web application
> (a WEB-INF/classes/log4j.properties file).
>
>
> Seriously, the Log4J documentation and mailing lists are elsewhere,
> http://logging.apache.org/log4j/1.2/mail-lists.html
>
> I'd be best to ask newbie questions there, even though this mailing
> list has a log of knowledgeable people that may occasionally help you.
>
> >
> > 3. Get rid of the empty localhost. file.
> >
>
> The configuration snippet that you provided does not have a "cluster"
> appender. Thus it does not matches your list of log files.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Logging makes a grown man cry

Posted by Konstantin Kolinko <kn...@gmail.com>.
2013/12/3 Tomcat Random <to...@gmail.com>:
> Environment is RHEL6, Tomcat 7.0.42. There is only one webapp.
>
> I'm trying to implement log4j as per the instructions here (skipping step
> 5):
> http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j
>
> Since I'm not using the Manager, I've removed the relevant logging lines
> from CATALINA_HOME/lib/log4j.properties, so it looks like this:
>
> _____________________________
> log4j.rootLogger=INFO, CATALINA
> (...)

> 1., 2.

Either filter by category names, or bundle its own
classloader-specific Log4J configuration with your own web application
(a WEB-INF/classes/log4j.properties file).


Seriously, the Log4J documentation and mailing lists are elsewhere,
http://logging.apache.org/log4j/1.2/mail-lists.html

I'd be best to ask newbie questions there, even though this mailing
list has a log of knowledgeable people that may occasionally help you.

>
> 3. Get rid of the empty localhost. file.
>

The configuration snippet that you provided does not have a "cluster"
appender. Thus it does not matches your list of log files.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org