Mantis - Resin
Viewing Issue Advanced Details
5260 minor always 10-25-12 17:48 11-03-14 18:42
rickHigh  
ferg  
normal  
closed  
no change required  
none    
none 4.0.42  
0005260: Logging to stdout not working like previous release (goes to wrong file)
We recently upgraded Resin from 4.023 to version 4.0.32 and it looks logging is no longer working as it had prior to the upgrade. Specifically, log handlers that are defined with the special ?stdout:? path are no longer writing to the file that we specified in the path of the special stdout tag. Instead, we are seeing the log messages in the watchdog?s jvm-default.log file. Here are the log definitions from our resin.xml file. The tags are all children of the cluster tag.
 
<stdout-log path=?/home/resin/logs/stdout-${serverId}.log" rollover-period="1D" timestamp="[%m/%d/%Y:%H:%M:%S.%s] " archive-format="stdout-${serverId}-%Y%m%d.log.gz"/>
<stderr-log path="/home/resin /logs/stderr-${serverId}.log" rollover-period="1D" timestamp="[%m/%d/%Y:%H:%M:%S.%s] " archive-format="stderr-${serverId}-%Y%m%d.log.gz"/>
 
<log-handler name="" level="info" path="stdout:" timestamp="" format="[${app.contextPath}] ${log.level} ${log.sourceClassName}.${log.sourceMethodName} ${log.message}"/>
 
<log-handler name="com.caucho" level="info" path="stdout:" timestamp=""/>
<log-handler name="com.caucho.java" level="config" path="stdout:" timestamp=""/>
<log-handler name="com.caucho.loader" level="config" path="stdout:" timestamp=""/>
 
I looked through the release notes and the Caucho issue tracker and I didn?t see any changes related to logging. Is this a possible bug or are we misinterpreting the stdout/stderr tags and how they relate to the special stdout/stderr paths in the handlers?

Notes
(0006548)
ferg   
11-03-14 18:42   
The issue looks like the placement in the <cluster> context.

The <cluster> isn't the same as the system context, so if the logging context is at the system context, you'll see the default configuration. In my testing the issue was the log-handler.

If the log-handler is moved out of the <cluster> and left in the <resin> context, the configured logs will go to the stdout-log handler.