Skip to content

Commit 78d855b

Browse files
committed
Inherit from base logger class
#5
1 parent 8f5fbb2 commit 78d855b

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/SplunkLogger/Loggers/HECBaseLogger.cs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,17 @@
44

55
namespace Splunk.Loggers
66
{
7-
public abstract class HECBaseLogger
7+
public abstract class HECBaseLogger : BaseLogger
88
{
9-
protected readonly ILoggerFormatter loggerFormatter;
109
protected readonly BatchManager batchManager;
1110

12-
readonly string categoryName;
13-
readonly LogLevel threshold;
1411
readonly HttpClient httpClient;
1512

16-
public HECBaseLogger(string categoryName, LogLevel threshold, HttpClient httpClient, BatchManager batchManager, ILoggerFormatter loggerFormatter)
13+
public HECBaseLogger(string categoryName, LogLevel threshold, HttpClient httpClient, BatchManager batchManager, ILoggerFormatter loggerFormatter)
14+
: base(categoryName, threshold, loggerFormatter)
1715
{
18-
this.categoryName = categoryName;
19-
this.threshold = threshold;
2016
this.httpClient = httpClient;
2117
this.batchManager = batchManager;
22-
this.loggerFormatter = loggerFormatter;
23-
}
24-
25-
public bool IsEnabled(LogLevel logLevel)
26-
{
27-
return (int)logLevel >= (int)threshold;
28-
}
29-
30-
public IDisposable BeginScope<T>(T state)
31-
{
32-
return null;
3318
}
3419
}
3520
}

0 commit comments

Comments
 (0)