Logging block does not log using local time zone RRS feed

  • Question

  • User1102616045 posted
    Enterprise Library 4.1 record UNC time while logging even if I use formatter timestamp as - Timestamp: {timestamp(local)} <formatters> <add template="Timestamp: {timestamp(local)} Message: {message} Category: {category} Priority: {priority} EventId: {eventid} Severity: {severity} Title:{title} Machine: {machine} Application Domain: {appDomain} Process Id: {processId} Process Name: {processName} Win32 Thread Id: {win32ThreadId} Thread Name: {threadName} Extended Properties: {dictionary({key} - {value} )}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Text Formatter" /> </formatters> Any idea how to configure Logging block to use local time zone ????
    Friday, June 19, 2009 7:49 AM


  • User1102616045 posted
    I have resolved the issue by setting TimeStamp property of LogEntry object by System.Now before writing it using Logger.Write.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, June 20, 2009 2:00 AM