Exemple #1
0
        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();
            }
        }
Exemple #2
0
 public LoggerClient(LogStorage storage, string prefix = null)
 {
     Storage = storage;
     Prefix  = prefix ?? GetType().Name;
 }