Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/05/10 10:31:40 (15 years ago)
Author:
gkronber
Message:

Copied refactored plugin infrastructure from branch and merged changeset r2586:2589 from branch into the trunk. #799

Location:
trunk/sources/HeuristicLab.Tracing/3.2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tracing/3.2/HeuristicLabTracingPlugin.cs

    r1534 r2591  
    33namespace HeuristicLab.Tracing {
    44
    5   [ClassInfo(Name = "HeuristicLab.Tracing-3.2")]
    6   [PluginFile(Filename = "HeuristicLab.Tracing-3.2.dll", Filetype = PluginFileType.Assembly)]
    7   [PluginFile(Filename = "log4net.dll", Filetype = PluginFileType.Assembly)]
    8   [PluginFile(Filename = "log4net licence.txt", Filetype = PluginFileType.License)]
    9   [PluginFile(Filename = "HeuristicLab.log4net.xml", Filetype = PluginFileType.Data)]
     5  [Plugin("HeuristicLab.Tracing-3.2")]
     6  [PluginFile("HeuristicLab.Tracing-3.2.dll", PluginFileType.Assembly)]
     7  [PluginFile("log4net.dll", PluginFileType.Assembly)]
     8  [PluginFile("log4net licence.txt", PluginFileType.License)]
     9  [PluginFile("HeuristicLab.log4net.xml", PluginFileType.Data)]
    1010  public class HeuristicLabPersistencePlugin : PluginBase {}
    1111
  • trunk/sources/HeuristicLab.Tracing/3.2/HiveLogger.cs

    r1935 r2591  
    1414      if (string.IsNullOrEmpty(Settings.Default.TracingLog4netConfigFile)) {
    1515        Settings.Default.TracingLog4netConfigFile =
    16           Path.Combine(
    17             PluginInfrastructure.Properties.Settings.Default.PluginDir,
    18             "HeuristicLab.Hive.log4net.xml");
     16            "HeuristicLab.Hive.log4net.xml";
    1917      }
    2018      XmlConfigurator.ConfigureAndWatch(
     
    2624      Configure();
    2725      StackFrame frame = new StackFrame(nParents + 1);
    28       return LogManager.GetLogger(frame.GetMethod().DeclaringType);     
     26      return LogManager.GetLogger(frame.GetMethod().DeclaringType);
    2927    }
    3028
     
    4745    }
    4846
    49     public static void Error(object message) {     
     47    public static void Error(object message) {
    5048      GetDefaultLogger(1).Error(message);
    5149    }
     
    6260    public static void Info(Type type, object message) {
    6361      Configure();
    64       LogManager.GetLogger(type).Info(message);     
     62      LogManager.GetLogger(type).Info(message);
    6563    }
    6664
    6765    public static void Warn(Type type, object message) {
    6866      Configure();
    69       LogManager.GetLogger(type).Warn(message);     
     67      LogManager.GetLogger(type).Warn(message);
    7068    }
    7169
  • trunk/sources/HeuristicLab.Tracing/3.2/Logger.cs

    r1933 r2591  
    1313
    1414    protected static void Configure() {
    15       if ( IsConfigured ) return;
     15      if (IsConfigured) return;
    1616      IsConfigured = true;
    1717      if (string.IsNullOrEmpty(Settings.Default.TracingLog4netConfigFile)) {
    18         Settings.Default.TracingLog4netConfigFile =
    19           Path.Combine(
    20             PluginInfrastructure.Properties.Settings.Default.PluginDir,
    21             "HeuristicLab.log4net.xml");
     18        Settings.Default.TracingLog4netConfigFile =
     19            "HeuristicLab.log4net.xml";
    2220      }
    2321      XmlConfigurator.ConfigureAndWatch(
     
    2927      Configure();
    3028      StackFrame frame = new StackFrame(nParents + 1);
    31       return LogManager.GetLogger(frame.GetMethod().DeclaringType);     
     29      return LogManager.GetLogger(frame.GetMethod().DeclaringType);
    3230    }
    3331
     
    5048    }
    5149
    52     public static void Error(object message) {     
     50    public static void Error(object message) {
    5351      GetDefaultLogger(1).Error(message);
    5452    }
     
    6563    public static void Info(Type type, object message) {
    6664      Configure();
    67       LogManager.GetLogger(type).Info(message);     
     65      LogManager.GetLogger(type).Info(message);
    6866    }
    6967
    7068    public static void Warn(Type type, object message) {
    7169      Configure();
    72       LogManager.GetLogger(type).Warn(message);     
     70      LogManager.GetLogger(type).Warn(message);
    7371    }
    7472
Note: See TracChangeset for help on using the changeset viewer.