forked from scriptcs/scriptcs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoggerConfigurator.cs
More file actions
31 lines (25 loc) · 836 Bytes
/
LoggerConfigurator.cs
File metadata and controls
31 lines (25 loc) · 836 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
using System;
using ScriptCs.Contracts;
using LogLevel = ScriptCs.Contracts.LogLevel;
namespace ScriptCs.Hosting
{
[Obsolete("Support for Common.Logging types was deprecated in version 0.15.0 and will soon be removed.")]
public class LoggerConfigurator : ILoggerConfigurator
{
private const string LoggerName = "scriptcs";
private readonly LogLevel _logLevel;
private Common.Logging.ILog _logger;
public LoggerConfigurator(LogLevel logLevel)
{
_logLevel = logLevel;
}
public void Configure(IConsole console)
{
_logger = new ScriptConsoleLogger(_logLevel, console, Common.Logging.LogManager.GetLogger(LoggerName));
}
public Common.Logging.ILog GetLogger()
{
return _logger;
}
}
}