This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| framework: auto-detect | |
| strategy: min | |
| source https://api.nuget.org/v3/index.json | |
| nuget Npgsql ~> 3.1.9 version_in_path: true | |
| nuget Serilog ~> 2.2 version_in_path: true | |
| nuget Serilog.Sinks.Literate ~> 2.0 version_in_path: true | |
| nuget Serilog.Sinks.TextWriter ~> 2.1 version_in_path: true | |
| nuget SerilogAnalyzer ~> 0.9.0 version_in_path: true | |
| nuget System.Collections.Immutable ~> 1.3.1 version_in_path: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| framework: auto-detect | |
| strategy: min | |
| source https://api.nuget.org/v3/index.json | |
| nuget Npgsql ~> 3.1.9 version_in_path: true | |
| nuget Serilog ~> 2.2 version_in_path: true | |
| nuget Serilog.Sinks.Literate ~> 2.0 version_in_path: true | |
| nuget Serilog.Sinks.TextWriter ~> 2.1 version_in_path: true | |
| nuget SerilogAnalyzer ~> 0.9.0 version_in_path: true | |
| nuget System.Collections.Immutable ~> 1.3.1 version_in_path: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SelfLog.Enable(Console.WriteLine); | |
| using (LogContext.PushProperty("SomeProperty", "SomeValue")) { | |
| // Works, but also raises a self log message | |
| Log.Information("Lets look at a property {SomeProperty}"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SourceContextSink : ILogEventSink { | |
| private readonly string _folderPath; | |
| private readonly ConcurrentDictionary<string, Lazy<FileSink>> _fileSinks; | |
| public SourceContextSink(string folderPath) { | |
| _folderPath = folderPath; | |
| _fileSinks = new ConcurrentDictionary<string, Lazy<FileSink>>(); | |
| } | |
| public void Emit(LogEvent logEvent) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Globalization; | |
| using Serilog; | |
| using Serilog.Events; | |
| namespace SeriLogTest { | |
| public class LogLevelFormatter : IFormatProvider, ICustomFormatter { | |
| private readonly IFormatProvider _innerFormatProvider; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Globalization; | |
| using Serilog; | |
| namespace SeriLogTest { | |
| enum Size { | |
| Small, | |
| Medium, | |
| Large |