🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
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.")
 
No edit summary
Line 1: Line 1:
<html>
<div class="outdated-alert">
<p> <span> ❗🕜 Warning: </span> this article may contain outdated information. Consider before using any descriptions/solutions, otherwise it still can be helpful. <a href="https://wiki.mdriven.net/index.php/MDriven_Product_Line#Synonyms_and_name_changes"> <span> Help : Synonyms and name changes </a>
</p>
</div>
</html>
This sample contained a nice section that send all ECO sql-logs to the Output window in VS2010.
This sample contained a nice section that send all ECO sql-logs to the Output window in VS2010.
<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>

Revision as of 12:38, 4 December 2018

This page was created by Alexandra on 2018-12-04. Last edited by Edgar on 2025-08-22.

❗🕜 Warning: this article may contain outdated information. Consider before using any descriptions/solutions, otherwise it still can be helpful. Help : Synonyms and name changes


This sample contained a nice section that send all ECO sql-logs to the Output window in VS2010.


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();

MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments