This project is read-only.

Logging

Log levels defined in TraceLevel enumeration.

Log to console

var tableDependency = new SqlTableDependency<Product>(connectionString);
tableDependency.OnChanged += this.TableDependency_Changed;
tableDependency.TraceLevel = TraceLevel.Verbose;
tableDependency.TraceListener = new TextWriterTraceListener(Console.Out);
tableDependency.Start();
...

Log to file

var tableDependency = new SqlTableDependency<Product>(connectionString);
tableDependency.OnChanged += this.TableDependency_Changed;
tableDependency.TraceLevel = TraceLevel.Verbose; 
tableDependency.TraceListener = new TextWriterTraceListener(File.Create("c:\\temp\\output.txt"));
tableDependency.Start();
...


Last edited Jul 3, 2016 at 9:19 PM by delbianco, version 2