public virtual void Log(Level loggingLevel, string method, object[] args) { IList throwables = TranslateArguments(args); @out.Println(FormatLine(Platform4.Now(), loggingLevel, method, args)); if (throwables != null) { for (IEnumerator tIter = throwables.GetEnumerator(); tIter.MoveNext(); ) { Exception t = ((Exception)tIter.Current); Platform4.PrintStackTrace(t, @out); } } }
public static string FormatMessage(Level loggingLevel, string method, object[] args ) { string s = string.Empty; if (args != null) { for (int objIndex = 0; objIndex < args.Length; ++objIndex) { object obj = args[objIndex]; if (s.Length > 0) { s += ", "; } s += obj; } } return "[" + Logger.LevelToString(loggingLevel) + "] " + FormatMethodName(method) + (args == null ? string.Empty : "(" + s + ")"); }
private object CreateProxy(Level loggingLevel) { try { return ReflectPlatform.NewInstance(_ctorLoggerClass, new object[] { this, loggingLevel }); } catch (Db4oException e) { throw new Exception("Error creating proxy", e); } }
public void PushCurrentLevel(Level level) { Logger.currentThreadLoggingLevel.Set(level); }
public void Log(Level loggingLevel, string method, object[] args) { Logger.rootInterceptor.Log(loggingLevel, method, args); }
public void LoggingLevel(Level loggingLevel) { this.loggingLevel = loggingLevel; }
private object SelectLevel(Level level, object logger) { if (level.Ordinal() < LoggingLevel().Ordinal()) { return nullImpl; } return logger; }
public void Log(Level loggingLevel, string method, object[] args) { methodsCalled.Add(Pair.Of(loggingLevel, method)); }
public void Log(Level loggingLevel, string method, object[] args) { Assert.Fail("The root interceptor should not be called"); }
public static string FormatLine(DateTime now, Level loggingLevel, string method, object[] args) { return Platform4.Format(now, true) + " " + FormatMessage(loggingLevel, method, args ); }
public static string LevelToString(Level loggingLevel) { return loggingLevel.ToString(); }
public static void LoggingLevel(Level loggingLevel) { Logger.loggingLevel = loggingLevel; }