using Serilog; namespace DotBased.Logging.Serilog; public static class BasedSerilog { /// /// Default output template with the extra properties that can be used for serilog sinks. /// public const string OutputTemplate = "[{Timestamp:HH:mm:ss} - {Caller}->{Assembly}] | {Level:u3}] {Message:lj}{NewLine}{Exception}"; public static LoggerConfiguration UseBasedExtension(this LoggerConfiguration loggerConfiguration) { loggerConfiguration.Enrich.FromLogContext().Enrich.With(new BasedSerilogEnricher()); return loggerConfiguration; } /// /// The extra properties this implementation adds to serilog /// public static class ExtraProperties { public const string AssemblyProp = "Assembly"; public const string SourceProp = "Source"; public const string CallerProp = "Caller"; } }