Skip to content

Commit

Permalink
Inherit from base logger class
Browse files Browse the repository at this point in the history
  • Loading branch information
Caldas committed Jan 9, 2018
1 parent 8f5fbb2 commit 78d855b
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions src/SplunkLogger/Loggers/HECBaseLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,17 @@

namespace Splunk.Loggers
{
public abstract class HECBaseLogger
public abstract class HECBaseLogger : BaseLogger
{
protected readonly ILoggerFormatter loggerFormatter;
protected readonly BatchManager batchManager;

readonly string categoryName;
readonly LogLevel threshold;
readonly HttpClient httpClient;

public HECBaseLogger(string categoryName, LogLevel threshold, HttpClient httpClient, BatchManager batchManager, ILoggerFormatter loggerFormatter)
public HECBaseLogger(string categoryName, LogLevel threshold, HttpClient httpClient, BatchManager batchManager, ILoggerFormatter loggerFormatter)
: base(categoryName, threshold, loggerFormatter)
{
this.categoryName = categoryName;
this.threshold = threshold;
this.httpClient = httpClient;
this.batchManager = batchManager;
this.loggerFormatter = loggerFormatter;
}

public bool IsEnabled(LogLevel logLevel)
{
return (int)logLevel >= (int)threshold;
}

public IDisposable BeginScope<T>(T state)
{
return null;
}
}
}

0 comments on commit 78d855b

Please sign in to comment.