|
| 1 | +namespace Serilog |
| 2 | +{ |
| 3 | + public static class ConsoleLoggerConfigurationExtensions |
| 4 | + { |
| 5 | + public static Serilog.LoggerConfiguration Console(this Serilog.Configuration.LoggerSinkConfiguration sinkConfiguration, Serilog.Formatting.ITextFormatter formatter, Serilog.Events.LogEventLevel restrictedToMinimumLevel = 0, Serilog.Core.LoggingLevelSwitch? levelSwitch = null, Serilog.Events.LogEventLevel? standardErrorFromLevel = default, object? syncRoot = null) { } |
| 6 | + public static Serilog.LoggerConfiguration Console(this Serilog.Configuration.LoggerSinkConfiguration sinkConfiguration, Serilog.Events.LogEventLevel restrictedToMinimumLevel = 0, string outputTemplate = "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}", System.IFormatProvider? formatProvider = null, Serilog.Core.LoggingLevelSwitch? levelSwitch = null, Serilog.Events.LogEventLevel? standardErrorFromLevel = default, Serilog.Sinks.SystemConsole.Themes.ConsoleTheme? theme = null, bool applyThemeToRedirectedOutput = false, object? syncRoot = null) { } |
| 7 | + } |
| 8 | +} |
| 9 | +namespace Serilog.Sinks.SystemConsole.Themes |
| 10 | +{ |
| 11 | + public class AnsiConsoleTheme : Serilog.Sinks.SystemConsole.Themes.ConsoleTheme |
| 12 | + { |
| 13 | + public AnsiConsoleTheme(System.Collections.Generic.IReadOnlyDictionary<Serilog.Sinks.SystemConsole.Themes.ConsoleThemeStyle, string> styles) { } |
| 14 | + public override bool CanBuffer { get; } |
| 15 | + protected override int ResetCharCount { get; } |
| 16 | + public static Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme Code { get; } |
| 17 | + public static Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme Grayscale { get; } |
| 18 | + public static Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme Literate { get; } |
| 19 | + public static Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme Sixteen { get; } |
| 20 | + public override void Reset(System.IO.TextWriter output) { } |
| 21 | + public override int Set(System.IO.TextWriter output, Serilog.Sinks.SystemConsole.Themes.ConsoleThemeStyle style) { } |
| 22 | + } |
| 23 | + public abstract class ConsoleTheme |
| 24 | + { |
| 25 | + protected ConsoleTheme() { } |
| 26 | + public abstract bool CanBuffer { get; } |
| 27 | + protected abstract int ResetCharCount { get; } |
| 28 | + public static Serilog.Sinks.SystemConsole.Themes.ConsoleTheme None { get; } |
| 29 | + public abstract void Reset(System.IO.TextWriter output); |
| 30 | + public abstract int Set(System.IO.TextWriter output, Serilog.Sinks.SystemConsole.Themes.ConsoleThemeStyle style); |
| 31 | + } |
| 32 | + public enum ConsoleThemeStyle |
| 33 | + { |
| 34 | + Text = 0, |
| 35 | + SecondaryText = 1, |
| 36 | + TertiaryText = 2, |
| 37 | + Invalid = 3, |
| 38 | + Null = 4, |
| 39 | + Name = 5, |
| 40 | + String = 6, |
| 41 | + Number = 7, |
| 42 | + Boolean = 8, |
| 43 | + Scalar = 9, |
| 44 | + [System.Obsolete("Use ConsoleThemeStyle.Scalar instead")] |
| 45 | + Object = 9, |
| 46 | + LevelVerbose = 10, |
| 47 | + LevelDebug = 11, |
| 48 | + LevelInformation = 12, |
| 49 | + LevelWarning = 13, |
| 50 | + LevelError = 14, |
| 51 | + LevelFatal = 15, |
| 52 | + } |
| 53 | + public class SystemConsoleTheme : Serilog.Sinks.SystemConsole.Themes.ConsoleTheme |
| 54 | + { |
| 55 | + public SystemConsoleTheme(System.Collections.Generic.IReadOnlyDictionary<Serilog.Sinks.SystemConsole.Themes.ConsoleThemeStyle, Serilog.Sinks.SystemConsole.Themes.SystemConsoleThemeStyle> styles) { } |
| 56 | + public override bool CanBuffer { get; } |
| 57 | + protected override int ResetCharCount { get; } |
| 58 | + public System.Collections.Generic.IReadOnlyDictionary<Serilog.Sinks.SystemConsole.Themes.ConsoleThemeStyle, Serilog.Sinks.SystemConsole.Themes.SystemConsoleThemeStyle> Styles { get; } |
| 59 | + public static Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme Colored { get; } |
| 60 | + public static Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme Grayscale { get; } |
| 61 | + public static Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme Literate { get; } |
| 62 | + public override void Reset(System.IO.TextWriter output) { } |
| 63 | + public override int Set(System.IO.TextWriter output, Serilog.Sinks.SystemConsole.Themes.ConsoleThemeStyle style) { } |
| 64 | + } |
| 65 | + public struct SystemConsoleThemeStyle |
| 66 | + { |
| 67 | + public System.ConsoleColor? Background; |
| 68 | + public System.ConsoleColor? Foreground; |
| 69 | + } |
| 70 | +} |
0 commit comments