log4j with timestamp per log entry

前端 未结 3 1144
别那么骄傲
别那么骄傲 2020-12-23 13:06

this is my log output

INFO main digestemails - process inbox
INFO main digestemails - checking for emails in c:\\development\\DCMail\\email\\KN-Source
INFO m         


        
3条回答
  •  无人及你
    2020-12-23 13:49

    Use %d in your PatternLayout.

    Also %d can take a format pattern as in %d{dd MMM yyyy HH:mm:ss,SSS} you can pick and choose the elements that you want. When the format pattern is omitted the date will be in ISO8601 format.

提交回复
热议问题