Help to change the format of timestamp

Topics: Logging Application Block
Sep 24, 2008 at 4:36 PM
Edited Sep 24, 2008 at 7:44 PM
I have a log file that is currently in the default format of

add template="Timestamp: {timestamp}
Message: {message}
Category: {category}
Priority: {priority}
EventId: {eventid}
Severity: {severity}
Machine: {machine}
Application Domain: {appDomain}
Process Id: {processId}
Process Name: {processName}
Win32 Thread Id: {win32ThreadId}
Thread Name: {threadName}
Extended Properties: {dictionary({key} - {value}



 is there any way I can change the format of my log file to look like this:

[INFO ][2008-09-10 16:24:01,504][ContextImpl] 

I did figure out how to change the time to reflect my local time instead of UTC by writing my custom class, however I dont know how to set the formatted (string) time back to the log file's timestamp.

Any help will be appreciated.




Sep 25, 2008 at 2:59 PM

This should help