• Not Answered

conversionPattern and SitecoreLogFileAppender

Hi 

The default conversion pattern in SitecoreLogFileAppender is "%4t %d{ABSOLUTE} %-5p %m%n".

But for some log-collecting purposes and usage of some 3rd part software, it is not enough for us, as we need not only to log the time of the day, but also the entire date-time, in each log entry. Does anybody know how to set the conversion pattern in order to do such?

Thanks a lot in advance

Boris

 

1 Reply

  • Hi

    As you said above you need not only time of the day to save in log but also entire date-time in each log entry , I have updated my sitecore.config LogFileAppender node
    conversion pattern from <!-- <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" /> --> To

    <conversionPattern value="%4t %d{DATE} %-5p %m%n" />

    Here is the result below :


    15788 07 Aug 2018 08:35:14 INFO HttpModule is being initialized
    15788 07 Aug 2018 08:35:14 INFO Sitecore started
    15788 07 Aug 2018 08:35:14 INFO Heartbeat - Initializing
    15788 07 Aug 2018 08:35:14 INFO Heartbeat - Interval set to: 00:00:02
    15788 07 Aug 2018 08:35:14 INFO Heartbeat - Worker thread started
    15788 07 Aug 2018 08:35:14 INFO
    15788 07 Aug 2018 08:35:14 INFO **********************************************************************
    15788 07 Aug 2018 08:35:14 INFO **********************************************************************
    15788 07 Aug 2018 08:35:14 INFO
    15788 07 Aug 2018 08:35:14 INFO xDB is enabled.
    15788 07 Aug 2018 08:35:14 INFO
    15788 07 Aug 2018 08:35:14 INFO Tracking is enabled.
    15788 07 Aug 2018 08:35:14 INFO
    15788 07 Aug 2018 08:35:14 INFO Valid xDB license is present.
    15788 07 Aug 2018 08:35:14 INFO
    15788 07 Aug 2018 08:35:14 INFO **********************************************************************