示例#1
0
        public static void GlobalLog(string message, LogVerbosityType verbosity = LogVerbosityType.Debug, string context = "(Global)")
        {
            if (verbosity == LogVerbosityType.Debug)
            {
#if DEBUG
                (LogWriter ?? Console.WriteLine)($"{context}:\n{new String('-', context.Length + 1)}\n{message}\n");
#endif
            }
            else
            {
                (LogWriter ?? Console.WriteLine)($"{context}:\n{new String('-', context.Length + 1)}\n{message}\n");
            }
        }
示例#2
0
 protected void Log(string message, LogVerbosityType verbosity = LogVerbosityType.Debug, [CallerMemberName] string callerName = "") =>
 GlobalLog(message, verbosity, $"{this.className}.{callerName} ({this.identifier})");