You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jerry Malcolm <2n...@gmail.com> on 2011/12/12 18:59:43 UTC

stderr

I have converted all of my logging to JULI stuff.  To meet my specific
requirements for outputs, etc, I ended up creating Loggers on the fly and
assigning handler file names as opposed to using logging.properties file.
Everything works like I expected except for one thing.  It appears that all
output from all loggers still gets copied to stderr log file.  I went in to
the conf/logging.properties file and changed everything to "ERROR".  No
change.  (BTW... I'm on Tomcat 7).

This is not a big deal.  But the stderr file gets huge really fast.  And it
doesn't roll over at midnight.  I've got to bounce Tomcat in order to get
rid of it.

Is there something I can do to control whether or not the loggers all copy
log info to stdout (I'm certain I don't have a 2nd handler or anything like
that on the loggers.  Just the single handler that writes it out the file
as designed).

Thanks.

Jerry

Re: stderr

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

Jerry,

On 12/12/11 12:59 PM, Jerry Malcolm wrote:
> I have converted all of my logging to JULI stuff.  To meet my
> specific requirements for outputs, etc, I ended up creating Loggers
> on the fly and assigning handler file names as opposed to using
> logging.properties file. Everything works like I expected except
> for one thing.  It appears that all output from all loggers still
> gets copied to stderr log file.

That may be the default behavior for java.util.logging when there is
no logging.properties file. (I really don't know, I don't use j.u.l).

> I went in to the conf/logging.properties file and changed
> everything to "ERROR".  No change.  (BTW... I'm on Tomcat 7).

That changes the configuration at the server level. I think you want
to change the configuration at the webapp level. What happens if you
create a logging.properties in your webapp's WEB-INF/classes directory.

> This is not a big deal.  But the stderr file gets huge really fast.
> And it doesn't roll over at midnight.  I've got to bounce Tomcat in
> order to get rid of it.

:(

You could log to a named-pipe and use a logger that knows what that means.

Better not to log to stdout (stderr doesn't seem right... are you sure?).

- -chrs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7maXoACgkQ9CaO5/Lv0PDRdQCePYVE2yxEm28/Gs5kWgKIrLP4
0dgAoLhaxUiYKNlIiR/nlQnNJ/ahjXi1
=WwgA
-----END PGP SIGNATURE-----

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