forked from wakatime/ssms-wakatime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogger.cs
More file actions
35 lines (28 loc) · 774 Bytes
/
Copy pathLogger.cs
File metadata and controls
35 lines (28 loc) · 774 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
26
27
28
29
30
31
32
33
34
35
using System;
using NLog;
namespace WakaTime
{
static class Logger
{
private static readonly NLog.Logger Log = LogManager.GetCurrentClassLogger();
internal static void Debug(string message)
{
if (!WakaTime.Debug)
return;
Log.Debug(message);
}
internal static void Error(string message, Exception ex = null)
{
var exceptionMessage = string.Format("{0}: {1}", message, ex);
Log.Error(exceptionMessage);
}
internal static void Warning(string message)
{
Log.Warn(message);
}
internal static void Info(string message)
{
Log.Info(message);
}
}
}