logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart S. (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-1091) StatusLogger no display errors from Appender misconfiguration
Date Wed, 12 Aug 2015 18:24:46 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Bart S. updated LOG4J2-1091:
    Attachment:     (was: TestAppenderNoError.java)

> StatusLogger no display errors from Appender misconfiguration
> -------------------------------------------------------------
>                 Key: LOG4J2-1091
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1091
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.4
>         Environment: Simple standalone runtime initializing the logging system in a default
way. Windows 7 x64. Newest Java 8 JDK. Latest clone off of git.
>            Reporter: Bart S.
>            Priority: Minor
>              Labels: easyfix
>   Original Estimate: 20m
>  Remaining Estimate: 20m
> When a {{FileAppender}} is created using the {{createAppender}} method with parameters
that conflict with each other are incorrect -- null values for the fileName, for instance,
the code will execute {{LOGGER.warn()}} or {{LOGGER.error()}}. Typically this should send
output through the statuslogger as defined in AbstractLifeCycle. In there a static LOGGER
is simply assigned by:
> {{protected static final org.apache.logging.log4j.Logger LOGGER = StatusLogger.getLogger();}}
> From injecting a System.out.println it is clear that the code must be getting executed.
It just doesn't produce anything, even though the returned value is null, referencing the
fact that the code decided that having a filename would be important. There are other ways
to trigger an error or warning, for instance by supplying both "locking" and "bufferedIo"
as _true_. In all cases no output message is generated. I have no clue why.
> I have written on the user list about it, but the emails are not getting through yet.
Attached file reproduces the error. Happens both with core version 2.3, and the latest 'trunk'
of 2.4.

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