| | 1 | | using Serilog; |
| | 2 | |
|
| | 3 | | namespace Imagini |
| | 4 | | { |
| | 5 | | public static class Logger |
| | 6 | | { |
| 754 | 7 | | public static Serilog.Core.Logger Log { get; set; } |
| | 8 | |
|
| | 9 | | static Logger() |
| | 10 | | { |
| | 11 | | #if DEBUG |
| | 12 | | Set(new LoggerConfiguration() |
| | 13 | | .MinimumLevel.Debug() |
| | 14 | | .WriteTo.Console()); |
| | 15 | | #else |
| 0 | 16 | | Set(new LoggerConfiguration() |
| 0 | 17 | | .MinimumLevel.Information() |
| 0 | 18 | | .WriteTo.Console()); |
| | 19 | | #endif |
| 1 | 20 | | } |
| | 21 | |
|
| | 22 | | /// <summary> |
| | 23 | | /// Sets global log settings for Imagini. |
| | 24 | | /// </summary> |
| | 25 | | public static void Set(LoggerConfiguration config) => |
| 1 | 26 | | Log = config.CreateLogger(); |
| | 27 | | } |
| | 28 | | } |