How can we add a a daily trace listener

S

ShayHk

i add on the web.config
<configuration>
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="aaa.log" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
</configuration>

i want it to be a daily file trace
aaa_20130101.txt
aaa_20130102.txt
.....

how can i do it?
 
A

Arne Vajhøj

i add on the web.config
<configuration>
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="aaa.log" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
</configuration>

i want it to be a daily file trace
aaa_20130101.txt
aaa_20130102.txt
....

how can i do it?

Maybe it is time to drop trace and switch to a real logging
framework - they come with features like this.

Example: log4net has RollingFileAppender for this.

Arne
 
Joined
Mar 13, 2023
Messages
4
Reaction score
0
We have anew machine with plc OMRON CP1H and HMI NT11-SF121B-ECV1-CH with RS232C
But the languge of this HMI is Chinese
any one can help me to change the language to English?

Best regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,056
Messages
2,570,446
Members
47,097
Latest member
MarionMajo

Latest Threads

Top