Custom Trace Listener

Topics: Logging Application Block
Jan 5, 2009 at 5:17 AM
Hi,

I have managed to create a custom trace listener using the guidelines (version 4.0).

However I have noticed tow problems:

1) The information is prionted twice
2) The timestamp is 2 hours out (should be 2:11:03 AM in the example below)

Timestamp: 5/01/2009 4:11:03 AM
Message: Timestamp: 5/01/2009 4:11:03 AM
Message: Saved search with ID: 66f1becb-5d5b-422e-9441-48ef09c0827f
Category: General
Priority: -1
EventId: 0
Severity: Information
Title:
Machine: BC7732
App Domain: Windows1.vshost.exe
ProcessId: 3188
Process Name: C:\Windows1\bin\Debug\Windows1.vshost.exe
Thread Name:
Win32 ThreadId:2172
Extended Properties:
Category: General
Priority: -1
EventId: 0
Severity: Information
Title:Saved search with ID: 66f1becb-5d5b-422e-9441-48ef09c0827f
Machine: BC7732
App Domain: Windows1.vshost.exe
ProcessId: 3188
Process Name: C:\Windows1\bin\Debug\Windows1.vshost.exe
Thread Name:
Win32 ThreadId:2172
Jan 5, 2009 at 5:51 AM
Hi,

With regard to the timestamp, you can try updating the timestamp token to this one {timestamp(local)}. Regarding your first item, can you post your custom trace listener code? Also verify your template.

Valiant Dudan
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com