mirror of
https://github.com/hmaxnl/DotBased.git
synced 2025-01-18 18:14:20 +01:00
29 lines
698 B
C#
Executable File
29 lines
698 B
C#
Executable File
// See https://aka.ms/new-console-template for more information
|
|
|
|
/*
|
|
* Test CLI application for development of DotBased
|
|
*/
|
|
|
|
|
|
using DotBased.Logging.Serilog;
|
|
using DotBased.Logging;
|
|
using Serilog;
|
|
using ILogger = Serilog.ILogger;
|
|
|
|
var serilogLogger = SetupSerilog();
|
|
LogService.AddLogAdapter(new BasedSerilogAdapter(serilogLogger));
|
|
var logger = LogService.RegisterLogger(typeof(Program));
|
|
|
|
logger.Information("Whoah... Hi!");
|
|
|
|
Console.ReadKey(); // Hold console app open.
|
|
return;
|
|
|
|
|
|
ILogger SetupSerilog()
|
|
{
|
|
var logConfig = new LoggerConfiguration()
|
|
.MinimumLevel.Verbose()
|
|
.WriteTo.Console(outputTemplate: BasedSerilog.OutputTemplate);
|
|
return logConfig.CreateLogger();
|
|
} |