Skip to content

Commit

Permalink
Added ILogger and LoggingSeverityLevel enum.
Browse files Browse the repository at this point in the history
  • Loading branch information
bernarden committed Feb 4, 2018
1 parent d1da036 commit c581641
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Source/Vima.LoggingAbstractor.Core/Class1.cs

This file was deleted.

36 changes: 36 additions & 0 deletions Source/Vima.LoggingAbstractor.Core/ILogger.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;

namespace Vima.LoggingAbstractor.Core
{
/// <summary>
/// Represents an instance of a logger.
/// </summary>
public interface ILogger
{
/// <summary>
/// Traces the message.
/// </summary>
/// <param name="message">The message.</param>
void TraceMessage(string message);

/// <summary>
/// Traces the message.
/// </summary>
/// <param name="message">The message to be logged.</param>
/// <param name="loggingSeverityLevel">The logging severity level.</param>
void TraceMessage(string message, LoggingSeverityLevel loggingSeverityLevel);

/// <summary>
/// Traces the exception.
/// </summary>
/// <param name="exception">The exception.</param>
void TraceException(Exception exception);

/// <summary>
/// Traces the exception.
/// </summary>
/// <param name="exception">The exception.</param>
/// <param name="loggingSeverityLevel">The logging severity level.</param>
void TraceException(Exception exception, LoggingSeverityLevel loggingSeverityLevel);
}
}
41 changes: 41 additions & 0 deletions Source/Vima.LoggingAbstractor.Core/LoggingSeverityLevel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;

namespace Vima.LoggingAbstractor.Core
{
/// <summary>
/// Represents the severity of the logged message or exception.
/// </summary>
[Flags]
public enum LoggingSeverityLevel
{
/// <summary>
/// Verbose.
/// </summary>
Verbose = 1,

/// <summary>
/// Information.
/// </summary>
Information = 2,

/// <summary>
/// Warning.
/// </summary>
Warning = 4,

/// <summary>
/// Error.
/// </summary>
Error = 8,

/// <summary>
/// Critical.
/// </summary>
Critical = 16,

/// <summary>
/// None.
/// </summary>
None = 32
}
}

0 comments on commit c581641

Please sign in to comment.