You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/07/06 14:55:21 UTC
[Bug 61255] New: PropertySource implementations log to stdout
instead of the log on shutdown
https://bz.apache.org/bugzilla/show_bug.cgi?id=61255
Bug ID: 61255
Summary: PropertySource implementations log to stdout instead
of the log on shutdown
Product: Tomcat 8
Version: 8.5.x-trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: JULI
Assignee: dev@tomcat.apache.org
Reporter: csutherl@redhat.com
Target Milestone: ----
Created attachment 35098
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35098&action=edit
JAR containing implementation of PropertySource
When using a custom implementation of PropertySource I noticed that the log
messages are printed to the catalina.$(date).log on startup, but on shutdown
they are printed to stdout and therefore not logged anywhere (catalina.out
doesn't get the redirected output on shutdown). JULI is working (the log
message is correct), but it isn't logging the way it should be on shutdown.
To reproduce:
1) Copy the attached JAR into $CATALINA_HOME/lib. The JAR contains a
PropertySource implementation with a single log message in the constructor.
2) Configure the PROPERTY_SOURCE system property in
$CATALINA_HOME/conf/catalina.properties
org.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.example.digester.PropertySourceImpl
3) Start tomcat and observe the message is not printed to stdout
4) Stop tomcat to observe the message is printed to stdout and not logged:
~~~
$ bin/shutdown.sh
<snip>
Jul 06, 2017 10:20:57 AM org.apache.tomcat.example.digester.PropertySourceImpl
<init>
INFO: PropertySourceImpl constructor
~~~
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 61255] PropertySource implementations log to stdout instead of
the log on shutdown
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61255
Remy Maucherat <re...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|NEW |RESOLVED
--- Comment #1 from Remy Maucherat <re...@apache.org> ---
The issue is that the logging configuration isn't set on stop by catalina.sh,
so it uses the default behavior.
Maybe the original rationale was that it's not useful (only used for
shutdown.sh, the shutdown hook doesn't use it). A problem with fixing it is
that a separate process would be opening the log files and maybe do some
logging -> not a good idea, that's why it should remain on the console. Even
though it is not very intuitive, it should work (a user is using shutdown.sh
from a console and is might see the output).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org