forked from ThatRendle/Simple.Data
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleDataTraceSources.cs
More file actions
25 lines (21 loc) · 914 Bytes
/
SimpleDataTraceSources.cs
File metadata and controls
25 lines (21 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System.Diagnostics;
namespace Simple.Data
{
public static class SimpleDataTraceSources
{
private const string TraceSourceName = "Simple.Data";
private const SourceLevels DefaultLevel = SourceLevels.Warning;
// Verbose=1xxx Information=2xxx Warning=3xxx Error=4xxx Critical=5xxx
internal const int DebugMessageId = 1000;
internal const int SqlMessageId = 2000;
internal const int GenericWarningMessageId = 3000;
internal const int PerformanceWarningMessageId = 3001;
internal const int ObsoleteWarningMessageId = 3002;
internal const int GenericErrorMessageId = 4000;
private static TraceSource _traceSource;
public static TraceSource TraceSource
{
get { return _traceSource ?? (_traceSource = new TraceSource(TraceSourceName, DefaultLevel)); }
}
}
}