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 + ")");
		}
Example #3
0
		private object CreateProxy(Level loggingLevel)
		{
			try
			{
				return ReflectPlatform.NewInstance(_ctorLoggerClass, new object[] { this, loggingLevel
					 });
			}
			catch (Db4oException e)
			{
				throw new Exception("Error creating proxy", e);
			}
		}
Example #4
0
		public void PushCurrentLevel(Level level)
		{
			Logger.currentThreadLoggingLevel.Set(level);
		}
Example #5
0
		public void Log(Level loggingLevel, string method, object[] args)
		{
			Logger.rootInterceptor.Log(loggingLevel, method, args);
		}
Example #6
0
		public void LoggingLevel(Level loggingLevel)
		{
			this.loggingLevel = loggingLevel;
		}
Example #7
0
		private object SelectLevel(Level level, object logger)
		{
			if (level.Ordinal() < LoggingLevel().Ordinal())
			{
				return nullImpl;
			}
			return logger;
		}
Example #8
0
			public void Log(Level loggingLevel, string method, object[] args)
			{
				methodsCalled.Add(Pair.Of(loggingLevel, method));
			}
Example #9
0
			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
				);
		}
Example #11
0
		public static string LevelToString(Level loggingLevel)
		{
			return loggingLevel.ToString();
		}
Example #12
0
		public static void LoggingLevel(Level loggingLevel)
		{
			Logger.loggingLevel = loggingLevel;
		}