Logging what MDriven does
(Created page with "This sample contained a nice section that send all ECO sql-logs to the Output window in VS2010.")
 
(Replacing message template with parser tag)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This sample contained a nice section that send all ECO sql-logs to the Output window in VS2010.
<message>Write the content here to display this box</message>
This sample contains a helpful section that sends all ECO SQL logs to the Output window:
 
<html>
 
<pre class="code">Eco.Logging.<span style="color: #2b91af">EcoLogSwitches</span>.LogSql = <span style="color: blue">true</span>;
Eco.Logging.<span style="color: #2b91af">EcoListener</span>.Singleton.OnTraceLog += (sender, args) =&gt;
    {
        System.Diagnostics.<span style="color: #2b91af">Trace</span>.WriteLine(<span style="color: #2b91af">Thread</span>.CurrentThread.Name + <span style="color: #a31515">":" </span>+ args.Message);
    };
Eco.Logging.<span style="color: #2b91af">EcoListener</span>.StartListening();
 
</pre>
</html>
[[Category:Visual Studio]]
{{Edited|July|12|2024}}

Latest revision as of 07:44, 17 June 2024

This sample contains a helpful section that sends all ECO SQL logs to the Output window:

Eco.Logging.EcoLogSwitches.LogSql = true;
Eco.Logging.EcoListener.Singleton.OnTraceLog += (sender, args) =>
    {
        System.Diagnostics.Trace.WriteLine(Thread.CurrentThread.Name + ":" + args.Message);
    };
Eco.Logging.EcoListener.StartListening();

This page was edited 95 days ago on 06/17/2024. What links here