[ 
https://issues.apache.org/jira/browse/LOG4J2-2250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16365035#comment-16365035
 ] 

Remko Popma commented on LOG4J2-2250:
-------------------------------------

Java 8 is not required. We just need to pass a date format String to the 
underlying {{SimpleLogger}} used by the status logger.

Something like the below should suffice:

{code}
    private StatusLogger(final String name, final MessageFactory 
messageFactory) {
        super(name, messageFactory);
        this.logger = new SimpleLogger("StatusLogger", Level.ERROR, false, 
true, false, false, 
                System.getProperty("status.dateformat", Strings.EMPTY), 
messageFactory, PROPS, System.err);
        this.listenersLevel = Level.toLevel(DEFAULT_STATUS_LEVEL, 
Level.WARN).intLevel();
...
{code}

> Need ISO8601 timestamp for StatusLogger
> ---------------------------------------
>
>                 Key: LOG4J2-2250
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2250
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.10.0
>            Reporter: Atle Tokle
>            Priority: Minor
>
> We use a log-indexing system that uses the date-format to see where next log 
> line begins.
> And have a requirement to standardize on ISO8601 format. But the lines 
> written by StatusLogger when Log4j2 has a different format. I would like a 
> configuration option that could specify the format. i.e.
> {code:java}
> <configuration verbose="true" status="trace" dateformat="ISO8601" >
> ...
> ...
> </configuration>{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to