Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1802


Ignore:
Timestamp:
05/14/09 14:44:59 (16 years ago)
Author:
kgrading
Message:

Added Log4NET Logging for Hive Client (#622)

Location:
trunk/sources/HeuristicLab.Hive.Client.Common/3.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Common/3.2/HeuristicLab.Hive.Client.Common-3.2.csproj

    r1534 r1802  
    100100      <Name>HeuristicLab.PluginInfrastructure</Name>
    101101    </ProjectReference>
     102    <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj">
     103      <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project>
     104      <Name>HeuristicLab.Tracing-3.2</Name>
     105    </ProjectReference>
    102106  </ItemGroup>
    103107  <ItemGroup>
  • trunk/sources/HeuristicLab.Hive.Client.Common/3.2/Logging.cs

    r1798 r1802  
    2525using System.Text;
    2626using System.Diagnostics;
     27using HeuristicLab.Tracing;
    2728
    2829namespace HeuristicLab.Hive.Client.Common {
     
    3435  public class Logging {     
    3536    private static Logging instance = null;
    36     private EventLog eventLogger = null;
    37 
    3837    /// <summary>
    3938    /// This is an implementation of the singleton design pattern.
     
    6564    /// <param name="message">the message</param>
    6665    public void Info(String source, String message) {
    67       DateTime current = DateTime.Now;
    68       Debug.WriteLine(current + " - " + source + ": " + message);
     66      Logger.Info(source + ": " + message);
     67
     68      //DateTime current = DateTime.Now;
     69      ///Debug.WriteLine(current + " - " + source + ": " + message);
    6970
    7071    //  eventLogger.Source = source;
     
    7980    /// <param name="message">the message</param>
    8081    public void Error(String source, String message) {
    81       DateTime current = DateTime.Now;
    82       Debug.WriteLine(current + " - " + source + ": " + message);
     82      Logger.Error(source + ": " + message);
     83     
     84      //DateTime current = DateTime.Now;
     85      //Debug.WriteLine(current + " - " + source + ": " + message);
    8386     
    8487      //eventLogger.Source = source;
     
    9598    /// <param name="e">the exception</param>
    9699    public void Error(String source, String message, Exception e) {
    97       DateTime current = DateTime.Now;
    98       Debug.WriteLine(current + " - " + source + ": " + e + message);
     100      Logger.Error(source + ": " + message, e);
     101      //DateTime current = DateTime.Now;
     102      //Debug.WriteLine(current + " - " + source + ": " + e + message);
    99103    //  eventLogger.Source = source;
    100104    //  eventLogger.WriteEntry(message +"\n" + e.ToString());
Note: See TracChangeset for help on using the changeset viewer.