[jboss-jira] [JBoss JIRA] (WFLY-3307) stdout lost with log4j.xml per-deployment logging

James Perkins (JIRA) issues at jboss.org
Thu May 8 14:33:56 EDT 2014


    [ https://issues.jboss.org/browse/WFLY-3307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12966572#comment-12966572 ] 

James Perkins commented on WFLY-3307:
-------------------------------------

This seems to be working for me. I see the following in the {{app.log}}.

{code}
2014-05-08 11:31:09,517 INFO  [stdout] (default task-1) Hello World.
{code}

Since there is no console appender defined in the {{log4j.xml}} configuration, it writes {{stdout}} and {{stderr}} to the file appender that is configured.

> stdout lost with log4j.xml per-deployment logging
> -------------------------------------------------
>
>                 Key: WFLY-3307
>                 URL: https://issues.jboss.org/browse/WFLY-3307
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Logging
>    Affects Versions: 8.1.0.CR1
>            Reporter: Takayoshi Kimura
>            Assignee: James Perkins
>         Attachments: log4j-war.zip
>
>
> With log4j.xml per-deployment logging, the appenders are added within the org.apache.log4j.Logger.getLogger() call. Currently System.out.println("foo") initializes no-handler "stdout" logger which is essencially no-op.
> To workaround, initializing the following 2 loggers before using System.out/err.
> {code}
> org.apache.log4j.Logger.getLogger("stdout");
> org.apache.log4j.Logger.getLogger("stderr");
> {code}



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the jboss-jira mailing list