// ------------------------------------------------------------------------------------------------- // // Copyright (c) 2007-2010 Enkari, Ltd. // Copyright (c) 2010 bbv Software Engineering AG // Copyright (c) 2011-2017 Ninject Project Contributors // Dual-licensed under the Apache License, Version 2.0, and the Microsoft Public License (Ms-PL). // // ------------------------------------------------------------------------------------------------- namespace Ninject.Extensions.Logging { using System; /// /// Logs messages to a customizable sink. /// public interface ILogger { /// /// Gets the type associated with the logger. /// Type Type { get; } /// /// Gets the name of the logger. /// string Name { get; } /// /// Gets a value indicating whether messages with Debug severity should be logged. /// bool IsDebugEnabled { get; } /// /// Gets a value indicating whether messages with Info severity should be logged. /// bool IsInfoEnabled { get; } /// /// Gets a value indicating whether messages with Trace severity should be logged. /// bool IsTraceEnabled { get; } /// /// Gets a value indicating whether messages with Warn severity should be logged. /// bool IsWarnEnabled { get; } /// /// Gets a value indicating whether messages with Error severity should be logged. /// bool IsErrorEnabled { get; } /// /// Gets a value indicating whether messages with Fatal severity should be logged. /// bool IsFatalEnabled { get; } /// /// Logs the specified message with Debug severity. /// /// The message. void Debug(string message); /// /// Logs the specified message with Debug severity. /// /// The message or format template. /// Any arguments required for the format template. void Debug(string format, params object[] args); /// /// Logs the specified exception with Debug severity. /// /// The exception to log. /// The message or format template. /// Any arguments required for the format template. void Debug(Exception exception, string format, params object[] args); /// /// Logs the specified exception with Debug severity. /// /// The message. /// The exception to log. void DebugException(string message, Exception exception); /// /// Logs the specified message with Info severity. /// /// The message. void Info(string message); /// /// Logs the specified message with Info severity. /// /// The message or format template. /// Any arguments required for the format template. void Info(string format, params object[] args); /// /// Logs the specified exception with Info severity. /// /// The exception to log. /// The message or format template. /// Any arguments required for the format template. void Info(Exception exception, string format, params object[] args); /// /// Logs the specified exception with Info severity. /// /// The message. /// The exception to log. void InfoException(string message, Exception exception); /// /// Logs the specified message with Trace severity. /// /// The message. void Trace(string message); /// /// Logs the specified message with Trace severity. /// /// The message or format template. /// Any arguments required for the format template. void Trace(string format, params object[] args); /// /// Logs the specified exception with Trace severity. /// /// The exception to log. /// The message or format template. /// Any arguments required for the format template. void Trace(Exception exception, string format, params object[] args); /// /// Logs the specified exception with Trace severity. /// /// The message. /// The exception to log. void TraceException(string message, Exception exception); /// /// Logs the specified message with Warn severity. /// /// The message. void Warn(string message); /// /// Logs the specified message with Warn severity. /// /// The message or format template. /// Any arguments required for the format template. void Warn(string format, params object[] args); /// /// Logs the specified exception with Warn severity. /// /// The exception to log. /// The message or format template. /// Any arguments required for the format template. void Warn(Exception exception, string format, params object[] args); /// /// Logs the specified message with Warn severity. /// /// The message. /// The exception to log. void WarnException(string message, Exception exception); /// /// Logs the specified message with Error severity. /// /// The message. void Error(string message); /// /// Logs the specified message with Error severity. /// /// The message or format template. /// Any arguments required for the format template. void Error(string format, params object[] args); /// /// Logs the specified exception with Error severity. /// /// The exception to log. /// The message or format template. /// Any arguments required for the format template. void Error(Exception exception, string format, params object[] args); /// /// Logs the specified exception with Error severity. /// /// The message. /// The exception to log. void ErrorException(string message, Exception exception); /// /// Logs the specified message with Fatal severity. /// /// The message. void Fatal(string message); /// /// Logs the specified message with Fatal severity. /// /// The message or format template. /// Any arguments required for the format template. void Fatal(string format, params object[] args); /// /// Logs the specified exception with Fatal severity. /// /// The exception to log. /// The message or format template. /// Any arguments required for the format template. void Fatal(Exception exception, string format, params object[] args); /// /// Logs the specified exception with Fatal severity. /// /// The message. /// The exception to log. void FatalException(string message, Exception exception); } }