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 + ")");
		}
Exemple #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);
			}
		}
Exemple #4
0
		public void PushCurrentLevel(Level level)
		{
			Logger.currentThreadLoggingLevel.Set(level);
		}
Exemple #5
0
		public void Log(Level loggingLevel, string method, object[] args)
		{
			Logger.rootInterceptor.Log(loggingLevel, method, args);
		}
Exemple #6
0
		public void LoggingLevel(Level loggingLevel)
		{
			this.loggingLevel = loggingLevel;
		}
Exemple #7
0
		private object SelectLevel(Level level, object logger)
		{
			if (level.Ordinal() < LoggingLevel().Ordinal())
			{
				return nullImpl;
			}
			return logger;
		}
Exemple #8
0
			public void Log(Level loggingLevel, string method, object[] args)
			{
				methodsCalled.Add(Pair.Of(loggingLevel, method));
			}
Exemple #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
				);
		}
Exemple #11
0
		public static string LevelToString(Level loggingLevel)
		{
			return loggingLevel.ToString();
		}
Exemple #12
0
		public static void LoggingLevel(Level loggingLevel)
		{
			Logger.loggingLevel = loggingLevel;
		}