- Timestamp:
- 03/31/09 16:32:40 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/Core/ConfigurationService.cs
r1469 r1473 50 50 customConfigurations[config.Key] = config.Value; 51 51 } 52 } catch {53 Logger.Warn("Could not load settings." );52 } catch (Exception e) { 53 Logger.Warn("Could not load settings.", e); 54 54 } 55 55 } … … 95 95 } 96 96 Formatters[formatter.Format].Add(formatter); 97 } catch (MissingMethodException ) {98 Logger.Warn("Could not instantiate " + t.VersionInvariantName() );97 } catch (MissingMethodException e) { 98 Logger.Warn("Could not instantiate " + t.VersionInvariantName(), e); 99 99 } 100 100 } … … 102 102 try { 103 103 Decomposers.Add((IDecomposer) Activator.CreateInstance(t, true)); 104 } catch (MissingMethodException ) {105 Logger.Warn("Could not instantiate " + t.VersionInvariantName() );104 } catch (MissingMethodException e) { 105 Logger.Warn("Could not instantiate " + t.VersionInvariantName(), e); 106 106 } 107 107 } -
trunk/sources/HeuristicLab.Tracing/HeuristicLab.log4net.xml
r1470 r1473 10 10 <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> 11 11 <layout type="log4net.Layout.PatternLayout"> 12 <conversionPattern value="%-4timestamp [%appdomain/%thread] %-5level %logger %ndc - %message%newline " />12 <conversionPattern value="%-4timestamp [%appdomain/%thread] %-5level %logger %ndc - %message%newline%exception" /> 13 13 </layout> 14 14 </appender> … … 26 26 <level value="INFO" /> 27 27 <appender-ref ref="BufferingForwardingAppender" /> 28 <appender-ref ref="RollingFileAppender" />29 28 </root> 30 29 -
trunk/sources/HeuristicLab.Tracing/Logger.cs
r1470 r1473 23 23 XmlConfigurator.ConfigureAndWatch( 24 24 new FileInfo(Settings.Default.log4netConfigFile)); 25 Info("logging initialized ");25 Info("logging initialized " + DateTime.Now); 26 26 } 27 27 … … 30 30 StackFrame frame = new StackFrame(nParents + 1); 31 31 return LogManager.GetLogger(frame.GetMethod().DeclaringType); 32 } 33 34 public static ILog GetDefaultLogger() { 35 Configure(); 36 StackFrame frame = new StackFrame(1); 37 return LogManager.GetLogger(frame.GetMethod().DeclaringType); 32 38 } 33 39 … … 54 60 public static void Debug(Type type, object message) { 55 61 Configure(); 56 LogManager.GetLogger(type).Debug(message); 62 LogManager.GetLogger(type).Debug(message); 57 63 } 58 64 … … 77 83 } 78 84 85 public static void Debug(object message, Exception exception) { 86 GetDefaultLogger(1).Debug(message, exception); 87 } 88 89 public static void Info(object message, Exception exception) { 90 GetDefaultLogger(1).Info(message, exception); 91 } 92 93 public static void Warn(object message, Exception exception) { 94 GetDefaultLogger(1).Warn(message, exception); 95 } 96 97 public static void Error(object message, Exception exception) { 98 GetDefaultLogger(1).Error(message, exception); 99 } 100 101 public static void Fatal(object message, Exception exception) { 102 GetDefaultLogger(1).Fatal(message, exception); 103 } 104 105 public static void Debug(Type type, object message, Exception exception) { 106 Configure(); 107 LogManager.GetLogger(type).Debug(message, exception); 108 } 109 110 public static void Info(Type type, object message, Exception exception) { 111 Configure(); 112 LogManager.GetLogger(type).Info(message, exception); 113 } 114 115 public static void Warn(Type type, object message, Exception exception) { 116 Configure(); 117 LogManager.GetLogger(type).Warn(message, exception); 118 } 119 120 public static void Error(Type type, object message, Exception exception) { 121 Configure(); 122 LogManager.GetLogger(type).Error(message, exception); 123 } 124 125 public static void Fatal(Type type, object message, Exception exception) { 126 Configure(); 127 LogManager.GetLogger(type).Fatal(message, exception); 128 } 129 79 130 } 80 131 }
Note: See TracChangeset
for help on using the changeset viewer.