[jboss-jira] [JBoss JIRA] (WFCORE-478) log4j ConsoleAppender won't display messages with per-deployment logging

Geert Coelmont (JIRA) issues at jboss.org
Tue Mar 3 06:39:50 EST 2015


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

Geert Coelmont commented on WFCORE-478:
---------------------------------------

Working with per-deployment configurable ConsoleAppender is IMHO essential for flexible development.
Suppose my development environment consists of several projects, each deployed to my local Wildfly server, that share a common utility project (deployed as a Jar in each of the applications). Suppose today I'm working on a single one of these projects and in the context of that I want to debug a class Foo from the utility project. I could add Foo to the log4j.properties of my current project and redeploy only this project. I would then see (in my development env. console) logging generated by Foo only from within this one project. Other deployed projects using Foo would not generate logging and thus not clutter my console output.
Currently I'm forced to alter the server's standalone.xml logging section, which impacts all other deployments, causing a lot of output that I don't want to see. This apart from the burden of having to restart the whole server with each change of logging settings.
Not sure what alternatives to ConsoleAppender exist that would allow me to do the same.

> log4j ConsoleAppender won't display messages with per-deployment logging
> ------------------------------------------------------------------------
>
>                 Key: WFCORE-478
>                 URL: https://issues.jboss.org/browse/WFCORE-478
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Logging
>            Reporter: James Perkins
>            Assignee: James Perkins
>            Priority: Minor
>
> Add the following log4j.properties file to a deployment and try to log.
> {code}
> # Root logger option
> log4j.rootLogger=INFO, stdout
> # Direct log messages to stdout
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.Target=System.out
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jboss-jira mailing list