mirror of
https://github.com/hmaxnl/DotBased.git
synced 2025-01-18 10:04:20 +01:00
Make cli buildable
This commit is contained in:
parent
03daea46e7
commit
d07d0f8a9d
|
@ -11,7 +11,7 @@ using Serilog;
|
||||||
using ILogger = Serilog.ILogger;
|
using ILogger = Serilog.ILogger;
|
||||||
|
|
||||||
var serilogLogger = SetupSerilog();
|
var serilogLogger = SetupSerilog();
|
||||||
LogService.AddLogAdapter(new SerilogAdapter(serilogLogger));
|
LogService.AddLogAdapter(new BasedSerilogAdapter(serilogLogger));
|
||||||
var logger = LogService.RegisterLogger(typeof(Program));
|
var logger = LogService.RegisterLogger(typeof(Program));
|
||||||
|
|
||||||
logger.Information("Whoah... Hi!");
|
logger.Information("Whoah... Hi!");
|
||||||
|
@ -24,6 +24,6 @@ ILogger SetupSerilog()
|
||||||
{
|
{
|
||||||
var logConfig = new LoggerConfiguration()
|
var logConfig = new LoggerConfiguration()
|
||||||
.MinimumLevel.Verbose()
|
.MinimumLevel.Verbose()
|
||||||
.WriteTo.Console(outputTemplate: SerilogAdapter.SampleTemplate);
|
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} - {Caller}->{Assembly}] | {Level:u3}] {Message:lj}{NewLine}{Exception}");
|
||||||
return logConfig.CreateLogger();
|
return logConfig.CreateLogger();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user