public static void Init(LogConfig config) { _instance = new LogManager(config); string initMessage = $@">>> LogManager initialized successfully. UTC time: {DateTime.UtcNow.ToString("R")}"; _instance.GetLogger("XLog.LogManager").Info(initMessage); }
public Logger GetLogger(string tag, LogConfig config = null) { if (string.IsNullOrEmpty(tag)) { throw new ArgumentNullException(nameof(tag)); } return new Logger(tag, config ?? Config); }
internal Logger(string tag, LogConfig config) { Tag = tag; _config = config; }
private LogManager(LogConfig config) { Config = config; }