MET08RESIMAPCDE - v2.43.0 -

Force EquipId to CellInstanceName and Jenkinsfile
This commit is contained in:
2022-05-05 16:07:29 -07:00
parent b5ad0ebcdb
commit d6887992a0
39 changed files with 2070 additions and 991 deletions

View File

@ -0,0 +1,35 @@
using Microsoft.Extensions.Logging;
namespace Shared;
public class ConsoleLogger : ILogger
{
public int EventId { get; set; }
private readonly string _Name;
private readonly LogLevel _LogLevel;
public ConsoleLogger(LogLevel logLevel, string name)
{
_Name = name;
EventId = 0;
_LogLevel = logLevel;
if (string.IsNullOrEmpty(_Name))
{ }
}
public IDisposable BeginScope<TState>(TState state) => null;
public bool IsEnabled(LogLevel logLevel) => logLevel >= _LogLevel;
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
{
if (IsEnabled(logLevel) && (EventId == 0 || EventId == eventId.Id))
{
string message = formatter(state, null);
Console.WriteLine(message);
}
}
}