DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
ConsoleLogger.cs
Go to the documentation of this file.
1 using System;
2 
4 
5 namespace Deveel.Diagnostics {
6  public class ConsoleLogger : ILogger {
7  public void Dispose() {
8  }
9 
10  public void Init(IDbConfig config) {
11  }
12 
13  public bool IsInterestedIn(LogLevel level) {
14  return true;
15  }
16 
17  public void Log(LogEntry entry) {
18  Console.Out.WriteLine("[{0}] {1:s} ({2}) - {3}", entry.Level.Name, entry.Time, entry.Source, entry.Message);
19 
20  if (entry.HasError) {
21  Console.Out.WriteLine(entry.Error.Message);
22  Console.Out.WriteLine(entry.Error.StackTrace);
23  }
24  }
25  }
26 }
void Init(IDbConfig config)
LogLevel
The level listened by a diagnostic logger
Definition: LogLevel.cs:23
bool IsInterestedIn(LogLevel level)