aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Logging/Logger.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common/Logging/Logger.cs')
-rw-r--r--MediaBrowser.Common/Logging/Logger.cs89
1 files changed, 0 insertions, 89 deletions
diff --git a/MediaBrowser.Common/Logging/Logger.cs b/MediaBrowser.Common/Logging/Logger.cs
deleted file mode 100644
index a6cb6d885..000000000
--- a/MediaBrowser.Common/Logging/Logger.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using MediaBrowser.Model.Logging;
-using System;
-
-namespace MediaBrowser.Common.Logging
-{
- /// <summary>
- /// Class Logger
- /// </summary>
- public static class Logger
- {
- /// <summary>
- /// Gets or sets the logger instance.
- /// </summary>
- /// <value>The logger instance.</value>
- internal static ILogger LoggerInstance { get; set; }
-
- /// <summary>
- /// Logs the info.
- /// </summary>
- /// <param name="message">The message.</param>
- /// <param name="paramList">The param list.</param>
- public static void LogInfo(string message, params object[] paramList)
- {
- LogEntry(message, LogSeverity.Info, null, paramList);
- }
-
- /// <summary>
- /// Logs the debug info.
- /// </summary>
- /// <param name="message">The message.</param>
- /// <param name="paramList">The param list.</param>
- public static void LogDebugInfo(string message, params object[] paramList)
- {
- LogEntry(message, LogSeverity.Debug, null, paramList);
- }
-
- /// <summary>
- /// Logs the exception.
- /// </summary>
- /// <param name="message">The message.</param>
- /// <param name="ex">The ex.</param>
- /// <param name="paramList">The param list.</param>
- public static void LogException(string message, Exception ex, params object[] paramList)
- {
- LogEntry(message, LogSeverity.Error, ex, paramList);
- }
-
- /// <summary>
- /// Logs the warning.
- /// </summary>
- /// <param name="message">The message.</param>
- /// <param name="paramList">The param list.</param>
- public static void LogWarning(string message, params object[] paramList)
- {
- LogEntry(message, LogSeverity.Warn, null, paramList);
- }
-
- /// <summary>
- /// Logs the entry.
- /// </summary>
- /// <param name="message">The message.</param>
- /// <param name="level">The level.</param>
- /// <param name="exception">The exception.</param>
- /// <param name="paramList">The param list.</param>
- private static void LogEntry(string message, LogSeverity level, Exception exception, params object[] paramList)
- {
- if (LoggerInstance == null)
- {
- return;
- }
-
- if (exception == null)
- {
- LoggerInstance.Log(level, message, paramList);
- }
- else
- {
- if (level == LogSeverity.Fatal)
- {
- LoggerInstance.FatalException(message, exception, paramList);
- }
- else
- {
- LoggerInstance.ErrorException(message, exception, paramList);
- }
- }
- }
- }
-}