logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail T." <mi+t...@aldan.algebra.com>
Subject Re: Separating some classes' messages from <root>
Date Thu, 24 Feb 2011 00:09:14 GMT
On 23.02.2011 18:18, Jacob Kjome wrote:
> <logger name="special.example.com" additivity="false">
> <level value="INFO"/>
> <appender-ref ref="STDERR"/>
> </logger> 
I tried that before -- it did not work... Here is the current actual 
config (full file is attached):

    <logger name="org.serviio.console" additivity="false">
    <level value="INFO"/>
    <appender-ref ref="STDERR"/>
    </logger>
    ...
    <root>
    <level value="DEBUG"/>
    <appender-ref ref="SERVERLOG"/>
    </root>

But, for some reason, when the class org.serviio.console.ServiioConsole 
tries to make a log entry, log4j attempts to open the server's log-file. 
Here is the full output of the application's start-up (with debug="true"):

    log4j: reset attribute= "false".
    log4j: Threshold ="null".
    log4j: Retreiving an instance of org.apache.log4j.Logger.
    log4j: Setting [org.serviio] additivity to [true].
    log4j: Level value for org.serviio is  [INFO].
    log4j: org.serviio level set to INFO
    log4j: Retreiving an instance of org.apache.log4j.Logger.
    log4j: Setting [org.jaudiotagger] additivity to [true].
    log4j: Level value for org.jaudiotagger is  [ERROR].
    log4j: org.jaudiotagger level set to ERROR
    log4j: Retreiving an instance of org.apache.log4j.Logger.
    log4j: Setting [org.restlet] additivity to [true].
    log4j: Level value for org.restlet is  [ERROR].
    log4j: org.restlet level set to ERROR
    log4j: Retreiving an instance of org.apache.log4j.Logger.
    log4j: Setting [org.serviio.console] additivity to [false].
    log4j: Level value for org.serviio.console is  [INFO].
    log4j: org.serviio.console level set to INFO
    log4j: Class name: [org.apache.log4j.ConsoleAppender]
    log4j: Setting property [threshold] to [DEBUG].
    log4j: Setting property [target] to [System.err].
    log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
    log4j: Setting property [conversionPattern] to [%d{ISO8601} %-5p
    [%c{1}] %m%n].
    log4j: Adding appender named [STDERR] to category [org.serviio.console].
    log4j: Retreiving an instance of org.apache.log4j.Logger.
    log4j: Setting [org.serviio.ui.view] additivity to [false].
    log4j: Level value for org.serviio.ui.view is  [INFO].
    log4j: org.serviio.ui.view level set to INFO
    log4j: Adding appender named [STDERR] to category [org.serviio.ui.view].
    log4j: Level value for root is  [DEBUG].
    log4j: root level set to DEBUG
    log4j: Class name: [org.apache.log4j.RollingFileAppender]
    log4j: Setting property [threshold] to [DEBUG].
    log4j: Setting property [append] to [true].
    log4j: Setting property [file] to [/var/log/serviio/serviio.log].
    log4j: Setting property [maxFileSize] to [500KB].
    log4j: Setting property [maxBackupIndex] to [5].
    log4j: Setting property [encoding] to [UTF-8].
    log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
    log4j: Setting property [conversionPattern] to [%d{ISO8601} %-5p
    [%c{1}] %m%n].
    log4j: setFile called: /var/log/serviio/serviio.log, true
    log4j:ERROR setFile(null,true) call failed.
    java.io.FileNotFoundException: /var/log/serviio/serviio.log
    (Permission denied)
             at java.io.FileOutputStream.openAppend(Native Method)
             at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
             at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
             at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
             at
    org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
             at
    org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
             at
    org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
             at
    org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:295)
             at
    org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)
             at
    org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191)
             at
    org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523)
             at
    org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:492)
             at
    org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1001)
             at
    org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:867)
             at
    org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:773)
             at
    org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
             at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
             at
    org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
             at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
             at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254)
             at
    org.serviio.console.ServiioConsole.<clinit>(ServiioConsole.java:59)

Any ideas? Thanks! Yours,

    -mi


Mime
View raw message