Enterprise Library Logging Application Block - change timestamp from UTC to Local Time

I implemented the Enterprise Library Application Blocks (3.1) for Logging and Exception Handling. Info messages go to a text file and exceptions go to the Event Log.  The Event Log entries are in local time and the Text file entries are in UTC.  Can I change the formatting on the Text file to display Local Time without rebuilding the source code for the app blocks. I'm using the signed assemblies that came with the library.
keningramAsked:
Who is Participating?
 
keningramConnect With a Mentor Author Commented:
Finally found it (through a post on codeplex). You change the token from {timestamp} to {timestamp(local:T)}.  I sure could not find that in any Microsoft documentation.  Hope this helps someone.
0
 
keningramAuthor Commented:
I can see where the documentation says "It now includes an enhanced version of the TimeStampToken class. Earlier releases of the Logging Application Block only allowed timestamps to be logged in Coordinated Universal Time (UTC). In this release, the timestamp token now supports a local: prefix that indicates that the timestamp should be displayed in local time. For more information, see Trace Listener Properties. "  but I can't find where to put the "local:" prefix.  I tried {local:timestamp}, local:{timestamp} and few other attempts.  I also don't see the information in the Trace Listener Properties docs.
0
 
LunchyCommented:
I've added this question to the database of solutions.  Thanks for posting.  As a note, clicking the delete question link when there are no expert comments actually deletes the question.  8*)

Lunchy
Friendly Neighbourhood Community Support Moderator
0
 
keningramAuthor Commented:
Thanks Lunchy. I was not sure what to do with the question after I answered it myself.
0
 
LunchyCommented:
>Thanks Lunchy. I was not sure what to do with the question after I answered it myself.

Next time, you can post a request for assistance to:
http://www.experts-exchange.com/Community_Support/General/
0
All Courses

From novice to tech pro — start learning today.