logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carfield Yim (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4J2-501) Issue on config log4j2 with JSON
Date Wed, 15 Jan 2014 03:00:25 GMT
Carfield Yim created LOG4J2-501:

             Summary: Issue on config log4j2 with JSON
                 Key: LOG4J2-501
                 URL: https://issues.apache.org/jira/browse/LOG4J2-501
             Project: Log4j 2
          Issue Type: Bug
          Components: Configurators
    Affects Versions: 2.0-beta9
         Environment: Windows 7
            Reporter: Carfield Yim
            Priority: Minor

I have below simple config for log4j2 which just log the message to console stdout and a file:
<?xml version="1.0" encoding="UTF-8"?>
        <RandomAccessFile name="FILE" fileName="app.log">
                <Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
        <Console name="STDOUT" target="SYSTEM_OUT">
            <PatternLayout pattern="%m%n" />
        <Root level="trace">
            <AppenderRef ref="FILE" />
            <AppenderRef ref="STDOUT" />

It working fine, but if I change to JSON config, it doesn't work, Someone suggest it maybe
a bug

{ "configuration": 
    "appenders": {
        "RandomAccessFile": { "name": "FILE", "fileName": "app.log",
            "PatternLayout": { "pattern": "%d %p %c{1.} [%t] %m%n" }
        "Console": { "name": "STDOUT", 
            "PatternLayout": { "pattern": "%m%n" }
    "loggers": {
        "root": { "level": "trace", 
            "AppenderRef": { "ref": "STDOUT" }, 
            "AppenderRef": { "ref": "FILE" }


This message was sent by Atlassian JIRA

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message