According to MSDN the following config files settings provide send tracing
information to event log:
<add name="MyListener"
<add name="MyEventListener"
type="System.Diagnostics.EventLogTraceListener, Version,
Culture, PublicKeyToken"
initializeData="MyConfigEventLog"/>
This doesn't work though.
How do I use EventLogTraceListener?
Thanks,
-Stan 7 8042
For a TextWriterTraceListener, the following works for me:
<add name="BTListener"
type="System.Diagnostics.TextWriterTraceListener,S ystem,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
initializeData="C:\temp\BTFileProcessing.log" />
José
"Stan" <no****@yahoo.com> a écrit dans le message de
news:O6**************@tk2msftngp13.phx.gbl... According to MSDN the following config files settings provide send tracing information to event log:
<add name="MyListener" <add name="MyEventListener" type="System.Diagnostics.EventLogTraceListener, Version, Culture, PublicKeyToken" initializeData="MyConfigEventLog"/>
This doesn't work though.
How do I use EventLogTraceListener?
Thanks,
-Stan
Where did you get version and PublicKeyToken from?
"José Joye" <jose.joye@__No_SPam__bluewin__maPS_oN__.ch> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl... For a TextWriterTraceListener, the following works for me:
<add name="BTListener" type="System.Diagnostics.TextWriterTraceListener,S ystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" initializeData="C:\temp\BTFileProcessing.log" />
José
"Stan" <no****@yahoo.com> a écrit dans le message de news:O6**************@tk2msftngp13.phx.gbl... According to MSDN the following config files settings provide send
tracing information to event log:
<add name="MyListener" <add name="MyEventListener" type="System.Diagnostics.EventLogTraceListener,
Version, Culture, PublicKeyToken" initializeData="MyConfigEventLog"/>
This doesn't work though.
How do I use EventLogTraceListener?
Thanks,
-Stan
From the GAC (\WINNT\Assembly).
The values I have are those installed with the 1.1 Framework for the
"System" assembly
José
"Stan" <no****@yahoo.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP09.phx.gbl... Where did you get version and PublicKeyToken from?
"José Joye" <jose.joye@__No_SPam__bluewin__maPS_oN__.ch> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... For a TextWriterTraceListener, the following works for me:
<add name="BTListener" type="System.Diagnostics.TextWriterTraceListener,S ystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" initializeData="C:\temp\BTFileProcessing.log" />
José
"Stan" <no****@yahoo.com> a écrit dans le message de news:O6**************@tk2msftngp13.phx.gbl... According to MSDN the following config files settings provide send tracing information to event log:
<add name="MyListener" <add name="MyEventListener" type="System.Diagnostics.EventLogTraceListener, Version, Culture, PublicKeyToken" initializeData="MyConfigEventLog"/>
This doesn't work though.
How do I use EventLogTraceListener?
Thanks,
-Stan
Hello Stan,
José is correct. In addition, some fields like PublicKeyToken are optional,
you can simplify it as the following:
<add name="MyEventListener"
type="System.Diagnostics.EventLogTraceListener"
initializeData="MyConfigEventLog"/>
Hope this helps.
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
And what is the role of initializeData="MyConfigEventLog" ?
"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:dO**************@cpmsftngxa06.phx.gbl... Hello Stan,
José is correct. In addition, some fields like PublicKeyToken are
optional, you can simplify it as the following:
<add name="MyEventListener" type="System.Diagnostics.EventLogTraceListener" initializeData="MyConfigEventLog"/>
Hope this helps.
Regards,
HuangTM Microsoft Online Partner Support MCSE/MCSD
Get Secure! -- www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
Hello Stan,
Thanks for your response.
For the EventLogTraceListener, the initializeData specifies the event log
to send events to. You can go to "Control Panel" -> "Administrative Tools"
-> "Event Viewer" to see the result. As in this case, an entry named
MyConfigEventLog will be created in the event log.
While for the TextWriterTraceListener, the initializeData attribute
specifies a file to output data to.
Please feel free to let me know if you have any problems or concerns.
Have a nice day!
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
I did not know about the simplified way...
I much prefer it since it is not version related.
By the way, I really agree with Stan, the documentation regarding usage of
tracing in the .exe.config file is rather confusing. It could be good to
update it ;-)
José
"Tian Min Huang" <ti******@online.microsoft.com> a écrit dans le message de
news:dO**************@cpmsftngxa06.phx.gbl... Hello Stan,
José is correct. In addition, some fields like PublicKeyToken are
optional, you can simplify it as the following:
<add name="MyEventListener" type="System.Diagnostics.EventLogTraceListener" initializeData="MyConfigEventLog"/>
Hope this helps.
Regards,
HuangTM Microsoft Online Partner Support MCSE/MCSD
Get Secure! -- www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Paulo Morgado |
last post by:
Hi al
How do I specify the EventLogEntryType when writing to
EventLogTraceListener
--
Paulo Morgad
Portuga
|
by: Ken |
last post by:
I would like to start using EventLogTraceListener, and am running into
a couple of significant limitations:
1) I have found that there is no way to write EventLog entries with
different...
|
by: Will Pittenger |
last post by:
I have a Windows program C# .NET solution where when I update its XML
documentation, some tags are not recognized and turned into the
corresponding HTML. Those tags include <c>, <code>, <para>,...
|
by: julien |
last post by:
Hi,
I have the following listeners in the web.config:
<add name="FileTraceListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="D:\CapriMon\CapriMon.log"/>
<add...
|
by: Stan |
last post by:
According to MSDN the following config files settings provide send tracing
information to event log:
<add name="MyListener"
<add name="MyEventListener"...
|
by: Cameron Laird |
last post by:
QOTW: "Python makes it easy to implement algorithms." - casevh
"Most of the discussion of immutables here seems to be caused by
newcomers wanting to copy an idiom from another language which...
|
by: Lloyd Dupont |
last post by:
Let say I have 2 methods:
void BeginGroup();
void BeginGroup(string msg);
when I want to refer to them I write
/// <see cref="BeginGroup"/>
But this cause a compiler warning, where my...
|
by: J Ames |
last post by:
My team has recently been moved into the Microsoft space from the Java
space. For the most part we are really enjoying the VS.NET 2005
environment, and have had little problem picking up C# (and...
|
by: Noman Ali |
last post by:
Hi,
It seems that ASP .NET 2.0 does not support XML documentation feature. Is
there any way to do this?
I serached alot and only find this solution but it didnot works for C#.
Here it is.
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |