-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ILogger and LoggingSeverityLevel enum.
- Loading branch information
Showing
3 changed files
with
77 additions
and
6 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
41
Source/Vima.LoggingAbstractor.Core/LoggingSeverityLevel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |