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

Bart S. updated LOG4J2-1091:
----------------------------
    Attachment: TestAppenderNoError.java

Least involved way to show that the error is not written to the console.

Output is:

ERROR StatusLogger No log4j2 configuration file found. Using default 
configuration: logging only errors to the console.
Returned appender: null

> 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
>         Attachments: TestAppenderNoError.java
>
>   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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to