Description
This configuration used to work in 2.6.2:
<?xml version="1.0" encoding="UTF-8"?> <Configuration status="warn"> <Appenders> <Console name="myConsole" target="SYSTEM_OUT"/> <Async name="myConsoleAsync"> <AppenderRef ref="myConsole" /> </Async> </Appenders> <Loggers> <AsyncRoot level="info" /> </Loggers> </Configuration>
With the current master (i.e. the upcoming 2.7) this does not work any more. The validator complains because the field "layout" is missing in
<Console name="myConsole" target="SYSTEM_OUT" />
According to the current documentation this is a bug:
Parameter Name | Type | Description |
---|---|---|
layout | Layout | The Layout to use to format the LogEvent. If no layout is supplied the default pattern layout of "%m%n" will be used. |
With this configuration it works:
<?xml version="1.0" encoding="UTF-8"?> <Configuration status="warn"> <Appenders> <Console name="myConsole" target="SYSTEM_OUT"> <DetailsLayout/> </Console> <Async name="myConsoleAsync"> <AppenderRef ref="myConsole" /> </Async> </Appenders> <Loggers> <AsyncRoot level="info" /> </Loggers> </Configuration>
Attachments
Issue Links
- is related to
-
LOG4J2-1259 Log4j threads are leaking on Tomcat shutdown
- Reopened