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: csuth...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to