Moving some functionality from ToolQit lib
This commit is contained in:
parent
1785433a67
commit
8c75917f6f
9 changed files with 57 additions and 7 deletions
|
|
@ -9,7 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DotBased.Log.Serilog\DotBased.Log.Serilog.csproj" />
|
||||
<ProjectReference Include="..\DotBased.Logging.Serilog\DotBased.Logging.Serilog.csproj" />
|
||||
<ProjectReference Include="..\DotBased\DotBased.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// See https://aka.ms/new-console-template for more information
|
||||
|
||||
using DotBased.Log.Serilog;
|
||||
using DotBased.Logging.Serilog;
|
||||
using DotBased.Logging;
|
||||
using Serilog;
|
||||
using ILogger = Serilog.ILogger;
|
||||
|
|
@ -19,11 +19,12 @@ logger.Error(new NullReferenceException("Test exception"),"Test ERROR log!");
|
|||
logger.Fatal(new NullReferenceException("Test exception"),"Test FATAL log!");
|
||||
|
||||
Console.ReadKey();
|
||||
return;
|
||||
|
||||
|
||||
ILogger SetupSerilog()
|
||||
{
|
||||
LoggerConfiguration logConfig = new LoggerConfiguration()
|
||||
var logConfig = new LoggerConfiguration()
|
||||
.MinimumLevel.Verbose()
|
||||
.WriteTo.Console(outputTemplate: SerilogAdapter.SampleTemplate);
|
||||
return logConfig.CreateLogger();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue