public static void DefaultLogEvent(LogStorage sender, Item message) { var pfx = $"{sender.Prefix}.{message.Prefix}".Trim('.'); var s = $"{DateTime.Now:T} [{VerbosityDescriptions[message.Verbosity]}] {pfx} : {message.Message}"; lock (consoleLocker) { Console.ForegroundColor = VerbosityConsoleColors[message.Verbosity]; Console.WriteLine(s); Console.ResetColor(); } }
public LoggerClient(LogStorage storage, string prefix = null) { Storage = storage; Prefix = prefix ?? GetType().Name; }