-
Notifications
You must be signed in to change notification settings - Fork 179
Use case: Logging
christiandelbianco edited this page Jun 18, 2017
·
1 revision
Log levels defined in TraceLevel enumeration.
var tableDependency = new SqlTableDependency<Product>(connectionString);
tableDependency.OnChanged += this.TableDependency_Changed;
tableDependency.TraceLevel = TraceLevel.Verbose;
tableDependency.TraceListener = new TextWriterTraceListener(Console.Out);
tableDependency.Start();
...
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();
...