namespace Common.Logging;
///
/// Generalized interface for a logger.
/// Contains Initialization and Stopping methods, an event for when a new log entry is entered.
/// Contains various methods to create a log entry.
///
public interface ILogger
{
///
/// Event that is thrown for all new log entries that have higher or equal log level to the .
///
event EventHandler? NewLogEntry;
///
/// Currently configured minimum log level.
/// Log entries that are written with lower than the configured are not logged.
/// Also the event is not thrown.
///
LogLevel CurrentMinimumLogLevel { get; }
///
/// Initialize the Logger once before using it.
/// Sets the minimum to . Therefore all log entries will be logged.
///
void Initialize();
///
/// Initialize the Logger once before using it.
///
/// log entries with a lower level than this will not be logged
void Initialize(LogLevel minimumLogLevel);
///
/// Empties queue and closes logging stream.
///
void StopLogging();
///
/// Changes minimum to the given level.
///
/// log entries with a lower level than this will not be logged anymore
void SetMinimumLogLevel(LogLevel newMinimumLogLevel);
#region Logging methods
///
/// Create a Log entry with the level .
///
/// Category of the log entry. Example: Location in Software
/// Message to describe what to log.
void LogTrace(string message, string category);
///
/// Create a Log entry with the level .
///
/// Category of the log entry. Example: Location in Software
/// Message to describe what to log.
void LogDebug(string message, string category);
///
/// Create a Log entry with the level .
///
/// Category of the log entry. Example: Location in Software
/// Message to describe what to log.
void LogInfo(string message, string category);
///
/// Create a Log entry with the level .
///
/// Category of the log entry. Example: Location in Software
/// Message to describe what to log.
void LogWarn(string message, string category);
///
/// Create a Log entry with the level .
///
/// Category of the log entry. Example: Location in Software
/// Message to describe what to log.
void LogError(string message, string category);
///
/// Create a Log entry with a assigned. No message provided.
///
/// Exception associated with the log entry.
/// Category of the log entry. Example: Location in Software
void LogException(Exception exception, string category);
///
/// Create a Log entry with a assigned.
///
/// Exception associated with the log entry.
/// Message to describe what to log.
/// Category of the log entry. Example: Location in Software
void LogException(Exception exception, string message, string category);
#endregion
}