error fixes
This commit is contained in:
parent
66c53ef815
commit
b05357ef6f
@ -1,4 +1,6 @@
|
|||||||
namespace DTLib.Logging.New;
|
using DTLib.Console;
|
||||||
|
|
||||||
|
namespace DTLib.Logging.New;
|
||||||
|
|
||||||
// вывод лога в консоль и файл
|
// вывод лога в консоль и файл
|
||||||
public class ConsoleLogger : ILogger
|
public class ConsoleLogger : ILogger
|
||||||
|
|||||||
@ -12,7 +12,6 @@ global using static DTLib.Tests.TesterLog;
|
|||||||
global using static DTLib.Tests.Program;
|
global using static DTLib.Tests.Program;
|
||||||
using DTLib.Logging.New;
|
using DTLib.Logging.New;
|
||||||
|
|
||||||
|
|
||||||
namespace DTLib.Tests;
|
namespace DTLib.Tests;
|
||||||
|
|
||||||
public static class Program
|
public static class Program
|
||||||
@ -21,8 +20,8 @@ public static class Program
|
|||||||
public static ILogger Logger;
|
public static ILogger Logger;
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
Console.OutputEncoding = Encoding.UTF8;
|
System.Console.OutputEncoding = Encoding.UTF8;
|
||||||
Console.InputEncoding = Encoding.UTF8;
|
System.Console.InputEncoding = Encoding.UTF8;
|
||||||
Logger=new CompositeLogger(new ConsoleLogger(),
|
Logger=new CompositeLogger(new ConsoleLogger(),
|
||||||
new FileLogger("logs", "DTLib.Tests"));
|
new FileLogger("logs", "DTLib.Tests"));
|
||||||
var mainContext = new ContextLogger(Logger, "Main");
|
var mainContext = new ContextLogger(Logger, "Main");
|
||||||
@ -38,6 +37,6 @@ public static class Program
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{ mainContext.LogError(ex); }
|
{ mainContext.LogError(ex); }
|
||||||
|
|
||||||
Console.ResetColor();
|
System.Console.ResetColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user