Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 24, 2012 03:49 PM by shabbir_215
Member
427 Points
419 Posts
Feb 24, 2012 10:54 AM|LINK
Hi All,
In WCF Trace log once it hits the max file size i want to create create a new file, and when that is full it will flip back to the other file.
I DOn't want to use circular tracing is there any other option to manage WCF svclog file size, Below is my web.config file
<diagnostics> <messageLogging logEntireMessage="true" logMalformedMessages="false" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="false" maxMessagesToLog="3000" maxSizeOfMessageToLog="20000000"/> </diagnostics> <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Information,ActivityTracing" propagateActivity="true"> <listeners> <add name="xml" /> </listeners> </source> <source name="System.ServiceModel.MessageLogging"> <listeners> <add name="xml" /> </listeners> </source> </sources> <sharedListeners> <add initializeData="C:\logs\msg.svclog" type="System.Diagnostics.XmlWriterTraceListener" name="xml" /> </sharedListeners> <trace autoflush="true" /> </system.diagnostics>
Thanks in Advance
Shabbir
Contributor
7130 Points
1273 Posts
Feb 24, 2012 12:32 PM|LINK
Check this thread -
http://stackoverflow.com/questions/7587836/how-do-i-manage-wcf-log-file-sizes-programatically
http://www.codeproject.com/Articles/30956/A-Rolling-XmlWriterTraceListener
Feb 24, 2012 03:49 PM|LINK
Thanks Kushal, It worked :)
shabbir_215
Member
427 Points
419 Posts
How to manage WCF svclog file size
Feb 24, 2012 10:54 AM|LINK
Hi All,
In WCF Trace log once it hits the max file size i want to create create a new file, and when that is full it will flip back to the other file.
I DOn't want to use circular tracing is there any other option to manage WCF svclog file size, Below is my web.config file
<diagnostics> <messageLogging logEntireMessage="true" logMalformedMessages="false" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="false" maxMessagesToLog="3000" maxSizeOfMessageToLog="20000000"/> </diagnostics> <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Information,ActivityTracing" propagateActivity="true"> <listeners> <add name="xml" /> </listeners> </source> <source name="System.ServiceModel.MessageLogging"> <listeners> <add name="xml" /> </listeners> </source> </sources> <sharedListeners> <add initializeData="C:\logs\msg.svclog" type="System.Diagnostics.XmlWriterTraceListener" name="xml" /> </sharedListeners> <trace autoflush="true" /> </system.diagnostics>kushalrdalal
Contributor
7130 Points
1273 Posts
Re: How to manage WCF svclog file size
Feb 24, 2012 12:32 PM|LINK
Check this thread -
http://stackoverflow.com/questions/7587836/how-do-i-manage-wcf-log-file-sizes-programatically
http://www.codeproject.com/Articles/30956/A-Rolling-XmlWriterTraceListener
My Blog
LinkedIn Profile
shabbir_215
Member
427 Points
419 Posts
Re: How to manage WCF svclog file size
Feb 24, 2012 03:49 PM|LINK
Thanks Kushal, It worked :)