Bug 724317 (BRMS-262) - BRMS User Guide - describe how STDOUT messages can be redirected to the AS FILE appender
Summary: BRMS User Guide - describe how STDOUT messages can be redirected to the AS FI...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: BRMS-262
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: Documentation
Version: 5.0.1
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: 5.0.2
Assignee: Dana Mison
QA Contact:
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-11 19:04 UTC by Tihomir Surdilovic
Modified: 2010-03-29 01:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-26 19:04:32 UTC
Type: Feature Request


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-262 0 Major Closed BRMS User Guide - describe how STDOUT messages can be redirected to the AS FILE appender 2014-01-15 15:15:36 UTC

Description Tihomir Surdilovic 2010-03-11 19:04:39 UTC
Date of First Response: 2010-03-11 14:12:40
Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/361675
securitylevel_name: Public

This is from BRMS-241

The BRMS war includes it's own log4j.xml configuration file in $BRMS_WAR/WEB-INF/classes directory. This configuration defines a single console appender which prints to STDOUT:

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) \t %m%n"/>
</layout>
</appender>

The system log4j ($server/$configuration/conf/jboss-log4j.xml) then intercepts STDOUT and logs it to the console.

In the user guide we should describe how users can redirect all STDOUT messages to the AS FILE appender (be written to the server logs)
For this in  $server/$configuration/conf/jboss-log4j.xml user can add a new category:

<category name="STDOUT" additivity="false">
     <priority value="INFO" />
     <appender-ref ref="FILE"/>
</category>

Comment 2 Dana Mison 2010-03-12 01:12:23 UTC
Summary for clarification:

* The BRMS WAR has its own log config that directs all output to STDOUT

* The default JBoss log config directs STDOUT to the console

* This configuration change is to direct STDOUT to the server logs instead.

Comment 3 Dana Mison 2010-03-15 06:51:05 UTC
This doesn't occur when deployed on EAP 4.3.CP07 with the production profile.  It does occur with the "default" profile. 

Comment 4 Dana Mison 2010-03-18 07:34:01 UTC
Added to BRMS User Guide, created new Logging section with following content:

The JBoss Enterprise BRMS Platform web application uses log4j for logging.  

The configuration included in the WAR, WEB-INF/classes/log4j.xml, sends all messages to STDOUT. When deployed on the JBoss Enterprise Application Platform where these messages are displayed depends on the server profile. When using the production profile, the log messages are appended to the server log file, $PROFILE/log/server.log. When deployed on the default server profile, the log messages are displayed on the server console.

To change the logging behavior, edit the log4j configuration file for the server profile, jboss-as/server/$PROFILE/conf/jboss-log4j.xml

Adding the following XML to the log4j configuration of the default server profile will create a new category that directs the STDOUT
messages to server log file.

<category name="STDOUT" additivity="false"> 
     <priority value="INFO" /> 
     <appender-ref ref="FILE"/> 
</category>

Refer to the JBoss Enterprise Application Platform documentation for additional logging configuration information.

Comment 5 Dana Mison 2010-03-18 07:35:16 UTC
Is this content accurate and adequate ?  Any suggestions ? 

Comment 6 Tihomir Surdilovic 2010-03-18 13:54:11 UTC
Darrin, this is really good. Thanks!

Comment 7 Dana Mison 2010-03-18 23:15:29 UTC
Content has been verified.  

I'm not really happy with the language in the "what happens in each profile" paragraph, I'll make a note to take another look at it before release if there is time.

Comment 9 Dana Mison 2010-03-29 01:48:56 UTC
Added to 5.0.2 release notes as a resolved issue:

BRMS-262
A new section (2.7) has been added to the BRMS User Guide to provide some guidance on alternative logging configurations.


Note You need to log in before you can comment on or make changes to this bug.