Mantis - Resin
Viewing Issue Advanced Details
5799 minor always 09-17-14 09:43 11-03-14 17:16
ferg  
ferg  
normal  
closed 4.0.37  
no change required  
none    
none 4.0.42  
0005799: stdout redirection issues
(rep by Igor Egorov)
I would like to redirect stdout stream to file by using 'stdout-log' configuration (on web-app level) with specified 'rollover-count' and 'rollover-size' properties in resin-pro-4.0.37.

The important point is that deployed web applications are using logback loggers (each application has it's own logback context) with their console appenders to perform logging in stdout.

Also I have to define external logback configuration file to support logging in deployed resource-adapter using logback as well.

<web-app xmlns="http://caucho.com/ns/resin" [^] xmlns:resin="urn:java:com.caucho.resin">
   
    <!-- Resource Adapter -->
    <resource-deploy path="${RESOURCES_LIB_PATH}" expand-path="${GLIBS_APP_HOME}/resources"/>

    <resource-adapter class="org.apache.activemq.ra.ActiveMQResourceAdapter" jndi-name="ActiveMQResourceAdapter">
        <init server-url="${ACTIVE_MQ_SERVER_URL}"/>
    </resource-adapter>
   
    <!-- ... -->
    <stdout-log path="${GLIBS_APP_HOME}/logs/resin_out.log" rollover-size="100mb" rollover-count="2"/>
    <!-- ... -->

</web-app>

Notes
(0006547)
ferg   
11-03-14 17:16   
env/021k

Checked with Resin 4.0.42. stdout-log works in the <web-app> file as expected.

Note that this feature is context-classloader dependent. If a resource uses a different classloader context, e.g. the system context, it will not go to the configured stdout-log.