Logging what ECO does

Peter Morris sent me a sample and it 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();

Since Peter does this kind of things all the time he probably thinks nothing of it – but I want to mention it here for my own reference at least  Ler

This entry was posted in VisualStudio. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*