Index: Core/guilib/Log.cs =================================================================== --- Core/guilib/Log.cs (revision 27641) +++ Core/guilib/Log.cs (working copy) @@ -40,19 +40,19 @@ GlobalServiceProvider.Get().BackupLogFile(logType); } - public static void Info(string format, params object[] arg) + public static void Info(string format) { - GlobalServiceProvider.Get().Info(format, arg); + GlobalServiceProvider.Get().Info(format); } - public static void Info(LogType type, string format, params object[] arg) + public static void Info(LogType type, string format) { - GlobalServiceProvider.Get().Info(type, format, arg); + GlobalServiceProvider.Get().Info(type, format); } - public static void Error(string format, params object[] arg) + public static void Error(string format) { - GlobalServiceProvider.Get().Error(format, arg); + GlobalServiceProvider.Get().Error(format); } public static void Error(Exception ex) @@ -60,35 +60,74 @@ GlobalServiceProvider.Get().Error(ex); } - public static void Error(LogType type, string format, params object[] arg) + public static void Error(LogType type, string format) { - GlobalServiceProvider.Get().Error(type, format, arg); + GlobalServiceProvider.Get().Error(type, format); } - public static void Warn(string format, params object[] arg) + public static void Warn(string format) { - GlobalServiceProvider.Get().Warn(format, arg); + GlobalServiceProvider.Get().Warn(format); } - public static void Warn(LogType type, string format, params object[] arg) + public static void Warn(LogType type, string format) { - GlobalServiceProvider.Get().Warn(type, format, arg); + GlobalServiceProvider.Get().Warn(type, format); } - public static void Debug(string format, params object[] arg) + public static void Debug(string format) { - GlobalServiceProvider.Get().Debug(format, arg); + GlobalServiceProvider.Get().Debug(format); } - public static void Debug(LogType type, string format, params object[] arg) + public static void Debug(LogType type, string format) { - GlobalServiceProvider.Get().Debug(type, format, arg); + GlobalServiceProvider.Get().Debug(type, format); } public static void SetLogLevel(Level logLevel) { GlobalServiceProvider.Get().SetLogLevel(logLevel); } - + + public static void Info(string format, object arg0) { Info(string.Format(format, arg0)); } + public static void Info(string format, object arg0, object arg1) { Info(string.Format(format, arg0, arg1)); } + public static void Info(string format, object arg0, object arg1, object arg2) { Info(string.Format(format, arg0, arg1, arg2)); } + public static void Info(string format, params object[] args) { Info(string.Format(format, args)); } + + public static void Info(LogType type, string format, object arg0) { Info(type, string.Format(format, arg0)); } + public static void Info(LogType type, string format, object arg0, object arg1) { Info(type, string.Format(format, arg0, arg1)); } + public static void Info(LogType type, string format, object arg0, object arg1, object arg2) { Info(type, string.Format(format, arg0, arg1, arg2)); } + public static void Info(LogType type, string format, params object[] args) { Info(type, string.Format(format, args)); } + + public static void Error(string format, object arg0) { Error(string.Format(format, arg0)); } + public static void Error(string format, object arg0, object arg1) { Error(string.Format(format, arg0, arg1)); } + public static void Error(string format, object arg0, object arg1, object arg2) { Error(string.Format(format, arg0, arg1, arg2)); } + public static void Error(string format, params object[] args) { Error(string.Format(format, args)); } + + public static void Error(LogType type, string format, object arg0) { Error(type, string.Format(format, arg0)); } + public static void Error(LogType type, string format, object arg0, object arg1) { Error(type, string.Format(format, arg0, arg1)); } + public static void Error(LogType type, string format, object arg0, object arg1, object arg2) { Error(type, string.Format(format, arg0, arg1, arg2)); } + public static void Error(LogType type, string format, params object[] args) { Error(type, string.Format(format, args)); } + + public static void Warn(string format, object arg0) { Info(string.Format(format, arg0)); } + public static void Warn(string format, object arg0, object arg1) { Info(string.Format(format, arg0, arg1)); } + public static void Warn(string format, object arg0, object arg1, object arg2) { Info(string.Format(format, arg0, arg1, arg2)); } + public static void Warn(string format, params object[] args) { Info(string.Format(format, args)); } + + public static void Warn(LogType type, string format, object arg0) { Info(type, string.Format(format, arg0)); } + public static void Warn(LogType type, string format, object arg0, object arg1) { Info(type, string.Format(format, arg0, arg1)); } + public static void Warn(LogType type, string format, object arg0, object arg1, object arg2) { Info(type, string.Format(format, arg0, arg1, arg2)); } + public static void Warn(LogType type, string format, params object[] args) { Info(type, string.Format(format, args)); } + + public static void Debug(string format, object arg0) { Debug(string.Format(format, arg0)); } + public static void Debug(string format, object arg0, object arg1) { Debug(string.Format(format, arg0, arg1)); } + public static void Debug(string format, object arg0, object arg1, object arg2) { Debug(string.Format(format, arg0, arg1, arg2)); } + public static void Debug(string format, params object[] args) { Debug(string.Format(format, args)); } + + public static void Debug(LogType type, string format, object arg0) { Debug(type, string.Format(format, arg0)); } + public static void Debug(LogType type, string format, object arg0, object arg1) { Debug(type, string.Format(format, arg0, arg1)); } + public static void Debug(LogType type, string format, object arg0, object arg1, object arg2) { Debug(type, string.Format(format, arg0, arg1, arg2)); } + public static void Debug(LogType type, string format, params object[] args) { Debug(type, string.Format(format, args)); } } } \ No newline at end of file Index: MediaPortal.Tests/MockObjects/NoLog.cs =================================================================== --- MediaPortal.Tests/MockObjects/NoLog.cs (revision 27641) +++ MediaPortal.Tests/MockObjects/NoLog.cs (working copy) @@ -39,34 +39,34 @@ /// /// The format of the string. /// An array containing the actual data of the string. - public void Write(string format, params object[] arg) {} + public void Write(string format) {} - public void Info(string format, params object[] arg) {} + public void Info(string format) {} - public void Info(LogType type, string format, params object[] arg) {} + public void Info(LogType type, string format) {} - public void Warn(string format, params object[] arg) {} + public void Warn(string format) {} - public void Warn(LogType type, string format, params object[] arg) {} + public void Warn(LogType type, string format) {} - public void Debug(string format, params object[] arg) {} + public void Debug(string format) {} - public void Debug(LogType type, string format, params object[] arg) {} + public void Debug(LogType type, string format) {} - public void Error(string format, params object[] arg) {} + public void Error(string format) {} - public void Error(LogType type, string format, params object[] arg) {} + public void Error(LogType type, string format) {} public void Error(Exception ex) {} public void SetConfigurationMode() {} - public void WriteFile(LogType type, bool isError, string format, params object[] arg) {} + public void WriteFile(LogType type, bool isError, string format) {} - public void WriteFile(LogType type, string format, params object[] arg) {} + public void WriteFile(LogType type, string format) {} - public void WriteFile(LogType type, Level logLevel, string format, params object[] arg) {} + public void WriteFile(LogType type, Level logLevel, string format) {} public void SetLogLevel(Level logLevel) {} } Index: RemotePlugins/ControlDevices/Devices/USBUIRT/USBUIRTPlugin.cs =================================================================== --- RemotePlugins/ControlDevices/Devices/USBUIRT/USBUIRTPlugin.cs (revision 27641) +++ RemotePlugins/ControlDevices/Devices/USBUIRT/USBUIRTPlugin.cs (working copy) @@ -19,6 +19,7 @@ #endregion using System; +using MediaPortal.ServiceImplementations; namespace MediaPortal.ControlDevices.USBUIRT { @@ -219,11 +220,11 @@ if (_uirtHandle != USBUIRTAPI.UUPTR_EMPTY) { - _log.Info("USBUIRT:Open success:{0}", DriverVersion); + Log.Info("USBUIRT:Open success:{0}", DriverVersion); } else { - _log.Error("USBUIRT:Unable to open USBUIRT driver"); + Log.Error("USBUIRT:Unable to open USBUIRT driver"); _uirtHandle = USBUIRTAPI.UUPTR_NULL; return false; } @@ -236,14 +237,14 @@ catch (DllNotFoundException e) { - _log.Error("USBUIRT: Error loading driver uuirtdrv.dll : ", e.Message); - _log.Error(e); + Log.Error("USBUIRT: Error loading driver uuirtdrv.dll : ", e.Message); + Log.Error(e); } catch (Exception e) { - _log.Error("USBUIRT: Error opening driver uuirtdrv.dll : ", e.Message); - _log.Error(e); + Log.Error("USBUIRT: Error opening driver uuirtdrv.dll : ", e.Message); + Log.Error(e); } return false; @@ -295,7 +296,7 @@ if (!result) { - _log.Error("USBUIRT: Unable to transmit code"); + Log.Error("USBUIRT: Unable to transmit code"); } // System.Threading.Thread.Sleep(interCommandDelay); } Index: RemotePlugins/ControlDevices/Util/AbstractControlPlugin.cs =================================================================== --- RemotePlugins/ControlDevices/Util/AbstractControlPlugin.cs (revision 27641) +++ RemotePlugins/ControlDevices/Util/AbstractControlPlugin.cs (working copy) @@ -27,14 +27,7 @@ private string _libraryName = string.Empty; protected IControlSettings _settings; protected string _dllPath = string.Empty; - protected ILog _log; - public AbstractControlPlugin() - { - ServiceProvider services = GlobalServiceProvider.Instance; - _log = services.Get(); - } - public string LibraryName { set { _libraryName = value; } Index: Utils/Localisation/LocalisationProvider.cs =================================================================== --- Utils/Localisation/LocalisationProvider.cs (revision 27641) +++ Utils/Localisation/LocalisationProvider.cs (working copy) @@ -26,6 +26,7 @@ using System.Xml.Serialization; using MediaPortal.Localisation.LanguageStrings; using MediaPortal.Services; +using MediaPortal.ServiceImplementations; using MediaPortal.Profile; using MediaPortal.Configuration; @@ -354,7 +355,7 @@ private void LoadStrings(string directory, string language, bool log, bool loadRTL) { string filename = "strings_" + language + ".xml"; - GlobalServiceProvider.Get().Info(" Loading strings file: {0}", filename); + Log.Info(" Loading strings file: {0}", filename); string path = Path.Combine(directory, filename); if (File.Exists(path)) @@ -401,7 +402,7 @@ useChineseHackNum = 1536; } } - GlobalServiceProvider.Get().Debug(" ExtendedChars = {0}:{0}, StringChars = {1}", useChineseHack, + Log.Debug(" ExtendedChars = {0}:{0}, StringChars = {1}", useChineseHack, useChineseHackNum, strings.characters); if (loadRTL) @@ -430,7 +431,7 @@ newSection.Add(languageString.id, languageString); if (log) { - GlobalServiceProvider.Get().Info(" String not found, using English: {0}", + Log.Info(" String not found, using English: {0}", languageString.ToString()); } } Index: Utils/ServiceImplementations/Log.cs =================================================================== --- Utils/ServiceImplementations/Log.cs (revision 27641) +++ Utils/ServiceImplementations/Log.cs (working copy) @@ -40,19 +40,19 @@ GlobalServiceProvider.Get().BackupLogFile(logType); } - public static void Info(string format, params object[] arg) + public static void Info(string format) { - GlobalServiceProvider.Get().Info(format, arg); + GlobalServiceProvider.Get().Info(format); } - public static void Info(LogType type, string format, params object[] arg) + public static void Info(LogType type, string format) { - GlobalServiceProvider.Get().Info(type, format, arg); + GlobalServiceProvider.Get().Info(type, format); } - public static void Error(string format, params object[] arg) + public static void Error(string format) { - GlobalServiceProvider.Get().Error(format, arg); + GlobalServiceProvider.Get().Error(format); } public static void Error(Exception ex) @@ -60,34 +60,74 @@ GlobalServiceProvider.Get().Error(ex); } - public static void Error(LogType type, string format, params object[] arg) + public static void Error(LogType type, string format) { - GlobalServiceProvider.Get().Error(type, format, arg); + GlobalServiceProvider.Get().Error(type, format); } - public static void Warn(string format, params object[] arg) + public static void Warn(string format) { - GlobalServiceProvider.Get().Warn(format, arg); + GlobalServiceProvider.Get().Warn(format); } - public static void Warn(LogType type, string format, params object[] arg) + public static void Warn(LogType type, string format) { - GlobalServiceProvider.Get().Warn(type, format, arg); + GlobalServiceProvider.Get().Warn(type, format); } - public static void Debug(string format, params object[] arg) + public static void Debug(string format) { - GlobalServiceProvider.Get().Debug(format, arg); + GlobalServiceProvider.Get().Debug(format); } - public static void Debug(LogType type, string format, params object[] arg) + public static void Debug(LogType type, string format) { - GlobalServiceProvider.Get().Debug(type, format, arg); + GlobalServiceProvider.Get().Debug(type, format); } public static void SetLogLevel(Level logLevel) { GlobalServiceProvider.Get().SetLogLevel(logLevel); } + + public static void Info(string format, object arg0) { Info(string.Format(format, arg0)); } + public static void Info(string format, object arg0, object arg1) { Info(string.Format(format, arg0, arg1)); } + public static void Info(string format, object arg0, object arg1, object arg2) { Info(string.Format(format, arg0, arg1, arg2)); } + public static void Info(string format, params object[] args) { Info(string.Format(format, args)); } + + public static void Info(LogType type, string format, object arg0) { Info(type, string.Format(format, arg0)); } + public static void Info(LogType type, string format, object arg0, object arg1) { Info(type, string.Format(format, arg0, arg1)); } + public static void Info(LogType type, string format, object arg0, object arg1, object arg2) { Info(type, string.Format(format, arg0, arg1, arg2)); } + public static void Info(LogType type, string format, params object[] args) { Info(type, string.Format(format, args)); } + + public static void Error(string format, object arg0) { Error(string.Format(format, arg0)); } + public static void Error(string format, object arg0, object arg1) { Error(string.Format(format, arg0, arg1)); } + public static void Error(string format, object arg0, object arg1, object arg2) { Error(string.Format(format, arg0, arg1, arg2)); } + public static void Error(string format, params object[] args) { Error(string.Format(format, args)); } + + public static void Error(LogType type, string format, object arg0) { Error(type, string.Format(format, arg0)); } + public static void Error(LogType type, string format, object arg0, object arg1) { Error(type, string.Format(format, arg0, arg1)); } + public static void Error(LogType type, string format, object arg0, object arg1, object arg2) { Error(type, string.Format(format, arg0, arg1, arg2)); } + public static void Error(LogType type, string format, params object[] args) { Error(type, string.Format(format, args)); } + + public static void Warn(string format, object arg0) { Info(string.Format(format, arg0)); } + public static void Warn(string format, object arg0, object arg1) { Info(string.Format(format, arg0, arg1)); } + public static void Warn(string format, object arg0, object arg1, object arg2) { Info(string.Format(format, arg0, arg1, arg2)); } + public static void Warn(string format, params object[] args) { Info(string.Format(format, args)); } + + public static void Warn(LogType type, string format, object arg0) { Info(type, string.Format(format, arg0)); } + public static void Warn(LogType type, string format, object arg0, object arg1) { Info(type, string.Format(format, arg0, arg1)); } + public static void Warn(LogType type, string format, object arg0, object arg1, object arg2) { Info(type, string.Format(format, arg0, arg1, arg2)); } + public static void Warn(LogType type, string format, params object[] args) { Info(type, string.Format(format, args)); } + + public static void Debug(string format, object arg0) { Debug(string.Format(format, arg0)); } + public static void Debug(string format, object arg0, object arg1) { Debug(string.Format(format, arg0, arg1)); } + public static void Debug(string format, object arg0, object arg1, object arg2) { Debug(string.Format(format, arg0, arg1, arg2)); } + public static void Debug(string format, params object[] args) { Debug(string.Format(format, args)); } + + public static void Debug(LogType type, string format, object arg0) { Debug(type, string.Format(format, arg0)); } + public static void Debug(LogType type, string format, object arg0, object arg1) { Debug(type, string.Format(format, arg0, arg1)); } + public static void Debug(LogType type, string format, object arg0, object arg1, object arg2) { Debug(type, string.Format(format, arg0, arg1, arg2)); } + public static void Debug(LogType type, string format, params object[] args) { Debug(type, string.Format(format, args)); } } } \ No newline at end of file Index: Utils/ServiceImplementations/log4netLogger.cs =================================================================== --- Utils/ServiceImplementations/log4netLogger.cs (revision 27641) +++ Utils/ServiceImplementations/log4netLogger.cs (working copy) @@ -75,81 +75,53 @@ public void BackupLogFile(LogType logType) {} - public void Info(string format, params object[] args) + public void Info(string format) { - Info(LogType.Log, format, args); + Info(LogType.Log, format); } - public void Info(LogType type, string format, params object[] args) + public void Info(LogType type, string format) { if (Level.Information <= _minLevel) { - if (args.Length > 0) - { - LogManager.GetLogger(GetLogTypeName(type)).InfoFormat(format, args); - } - else - { - LogManager.GetLogger(GetLogTypeName(type)).Info(format); - } + LogManager.GetLogger(GetLogTypeName(type)).Info(format); } } - public void Warn(string format, params object[] args) + public void Warn(string format) { - Warn(LogType.Log, format, args); + Warn(LogType.Log, format); } - public void Warn(LogType type, string format, params object[] args) + public void Warn(LogType type, string format) { if (Level.Warning <= _minLevel) { - if (args.Length > 0) - { - LogManager.GetLogger(GetLogTypeName(type)).WarnFormat(format, args); - } - else - { - LogManager.GetLogger(GetLogTypeName(type)).Warn(format); - } + LogManager.GetLogger(GetLogTypeName(type)).Warn(format); } } - public void Debug(string format, params object[] args) + public void Debug(string format) { - Debug(LogType.Log, format, args); + Debug(LogType.Log, format); } - public void Debug(LogType type, string format, params object[] args) + public void Debug(LogType type, string format) { if (Level.Debug <= _minLevel) { - if (args.Length > 0) - { - LogManager.GetLogger(GetLogTypeName(type)).DebugFormat(format, args); - } - else - { - LogManager.GetLogger(GetLogTypeName(type)).Debug(format); - } + LogManager.GetLogger(GetLogTypeName(type)).Debug(format); } } - public void Error(string format, params object[] args) + public void Error(string format) { - Error(LogType.Error, format, args); + Error(LogType.Error, format); } - public void Error(LogType type, string format, params object[] args) + public void Error(LogType type, string format) { - if (args.Length > 0) - { - LogManager.GetLogger(GetLogTypeName(type)).ErrorFormat(format, args); - } - else - { - LogManager.GetLogger(GetLogTypeName(type)).Error(format); - } + LogManager.GetLogger(GetLogTypeName(type)).Error(format); } public void Error(Exception ex) Index: Utils/ServiceImplementations/LogImpl.cs =================================================================== --- Utils/ServiceImplementations/LogImpl.cs (revision 27641) +++ Utils/ServiceImplementations/LogImpl.cs (working copy) @@ -169,11 +169,11 @@ public void Write(Exception ex) { - WriteFile(LogType.Log, true, "Exception :{0}", SafeString(ex.ToString())); - WriteFile(LogType.Log, true, "Exception :{0}", SafeString(ex.Message)); - WriteFile(LogType.Log, true, " site :{0}", ex.TargetSite); - WriteFile(LogType.Log, true, " source :{0}", ex.Source); - WriteFile(LogType.Log, true, " stacktrace:{0}", ex.StackTrace); + WriteFile(LogType.Log, true, string.Format("Exception :{0}", SafeString(ex.ToString()))); + WriteFile(LogType.Log, true, string.Format("Exception :{0}", SafeString(ex.Message))); + WriteFile(LogType.Log, true, string.Format(" site :{0}", ex.TargetSite)); + WriteFile(LogType.Log, true, string.Format(" source :{0}", ex.Source)); + WriteFile(LogType.Log, true, string.Format(" stacktrace:{0}", ex.StackTrace)); } /// @@ -181,7 +181,7 @@ /// /// The format of the string. /// An array containing the actual data of the string. - public void Write(string format, params object[] arg) + public void Write(string format) { // uncomment the following four lines to help identify the calling method, this // is useful in situations where an unreported exception causes problems @@ -190,47 +190,47 @@ // MethodBase methodBase = stackFrame.GetMethod(); // WriteFile(LogType.Log, "{0}", methodBase.Name); - WriteFile(LogType.Log, format, arg); + WriteFile(LogType.Log, format); } - public void Info(string format, params object[] arg) + public void Info(string format) { - WriteFile(LogType.Log, Level.Information, format, arg); + WriteFile(LogType.Log, Level.Information, format); } - public void Info(LogType type, string format, params object[] arg) + public void Info(LogType type, string format) { - WriteFile(type, Level.Information, format, arg); + WriteFile(type, Level.Information, format); } - public void Warn(string format, params object[] arg) + public void Warn(string format) { - WriteFile(LogType.Log, Level.Warning, format, arg); + WriteFile(LogType.Log, Level.Warning, format); } - public void Warn(LogType type, string format, params object[] arg) + public void Warn(LogType type, string format) { - WriteFile(type, Level.Warning, format, arg); + WriteFile(type, Level.Warning, format); } - public void Debug(string format, params object[] arg) + public void Debug(string format) { - WriteFile(LogType.Log, Level.Debug, format, arg); + WriteFile(LogType.Log, Level.Debug, format); } - public void Debug(LogType type, string format, params object[] arg) + public void Debug(LogType type, string format) { - WriteFile(type, Level.Debug, format, arg); + WriteFile(type, Level.Debug, format); } - public void Error(string format, params object[] arg) + public void Error(string format) { - WriteFile(LogType.Log, true, format, arg); + WriteFile(LogType.Log, true, format); } - public void Error(LogType type, string format, params object[] arg) + public void Error(LogType type, string format) { - WriteFile(type, true, format, arg); + WriteFile(type, true, format); } public void Error(Exception ex) @@ -304,21 +304,21 @@ _minLevel = Level.Debug; } - public void WriteFile(LogType type, bool isError, string format, params object[] arg) + public void WriteFile(LogType type, bool isError, string format) { - WriteFile(type, format, arg); + WriteFile(type, format); if (isError) { - WriteFile(LogType.Error, Level.Error, format, arg); + WriteFile(LogType.Error, Level.Error, format); } } - public void WriteFile(LogType type, string format, params object[] arg) + public void WriteFile(LogType type, string format) { - WriteFile(type, Level.Information, format, arg); + WriteFile(type, Level.Information, format); } - public void WriteFile(LogType type, Level logLevel, string format, params object[] arg) + public void WriteFile(LogType type, Level logLevel, string format) { if (logLevel <= _minLevel) { @@ -340,7 +340,7 @@ writer.WriteLine("{0:yyyy-MM-dd HH:mm:ss.ffffff} [{1}][{2}({3})]: {4}", DateTime.Now, GetLevelName(logLevel), threadName, threadId, - (arg == null || arg.Length < 1) ? format : string.Format(format, arg)); + format); //avoid string.format if we don't have arguments writer.Close(); } @@ -353,7 +353,7 @@ if (type != LogType.Log && type != LogType.Error && type != LogType.EPG && type != LogType.MusicShareWatcher && type != LogType.WebEPG) { - WriteFile(LogType.Log, format, arg); + WriteFile(LogType.Log, format); } } Index: Utils/Services/ILog.cs =================================================================== --- Utils/Services/ILog.cs (revision 27641) +++ Utils/Services/ILog.cs (working copy) @@ -27,17 +27,17 @@ void BackupLogFiles(); void BackupLogFile(LogType logType); - void Info(string format, params object[] arg); - void Info(LogType type, string format, params object[] arg); + void Info(string format); + void Info(LogType type, string format); - void Warn(string format, params object[] arg); - void Warn(LogType type, string format, params object[] arg); + void Warn(string format); + void Warn(LogType type, string format); - void Debug(string format, params object[] arg); - void Debug(LogType type, string format, params object[] arg); + void Debug(string format); + void Debug(LogType type, string format); - void Error(string format, params object[] arg); - void Error(LogType type, string format, params object[] arg); + void Error(string format); + void Error(LogType type, string format); void Error(Exception ex); void SetConfigurationMode(); Index: Utils/Threading/ThreadPool.cs =================================================================== --- Utils/Threading/ThreadPool.cs (revision 27641) +++ Utils/Threading/ThreadPool.cs (working copy) @@ -37,7 +37,7 @@ /// /// message to log /// objects to format into the message - public delegate void LoggerDelegate(string format, params object[] args); + public delegate void LoggerDelegate(string format); #endregion @@ -657,38 +657,58 @@ #region Logging methods - private void LogInfo(string format, params object[] args) + private void LogInfo(string format) { if (InfoLog != null) { - InfoLog(format, args); + InfoLog(format); } } - private void LogWarn(string format, params object[] args) + private void LogWarn(string format) { if (WarnLog != null) { - WarnLog(format, args); + WarnLog(format); } } - private void LogError(string format, params object[] args) + private void LogError(string format) { if (ErrorLog != null) { - ErrorLog(format, args); + ErrorLog(format); } } - private void LogDebug(string format, params object[] args) + private void LogDebug(string format) { if (DebugLog != null) { - DebugLog(format, args); + DebugLog(format); } } + private void LogDebug(string format, object arg0) { LogDebug(string.Format(format, arg0)); } + private void LogDebug(string format, object arg0, object arg1) { LogDebug(string.Format(format, arg0, arg1)); } + private void LogDebug(string format, object arg0, object arg1, string arg2) { LogDebug(string.Format(format, arg0, arg1, arg2)); } + private void LogDebug(string format, params object[] args) { LogError(string.Format(format, args)); } + + private void LogInfo(string format, object arg0) { LogInfo(string.Format(format, arg0)); } + private void LogInfo(string format, object arg0, object arg1) { LogInfo(string.Format(format, arg0, arg1)); } + private void LogInfo(string format, object arg0, object arg1, string arg2) { LogInfo(string.Format(format, arg0, arg1, arg2)); } + private void LogInfo(string format, params object[] args) { LogError(string.Format(format, args)); } + + private void LogWarn(string format, object arg0) { LogWarn(string.Format(format, arg0)); } + private void LogWarn(string format, object arg0, object arg1) { LogWarn(string.Format(format, arg0, arg1)); } + private void LogWarn(string format, object arg0, object arg1, string arg2) { LogWarn(string.Format(format, arg0, arg1, arg2)); } + private void LogWarn(string format, params object[] args) { LogError(string.Format(format, args)); } + + private void LogError(string format, object arg0) { LogError(string.Format(format, arg0)); } + private void LogError(string format, object arg0, object arg1) { LogError(string.Format(format, arg0, arg1)); } + private void LogError(string format, object arg0, object arg1, string arg2) { LogError(string.Format(format, arg0, arg1, arg2)); } + private void LogError(string format, params object[] args) { LogError(string.Format(format, args)); } + #endregion #endregion Index: Utils/Web/http/HTMLPage.cs =================================================================== --- Utils/Web/http/HTMLPage.cs (revision 27641) +++ Utils/Web/http/HTMLPage.cs (working copy) @@ -23,6 +23,7 @@ using System.Text; using System.Threading; using MediaPortal.Services; +using MediaPortal.ServiceImplementations; using mshtml; using SHDocVw; @@ -266,7 +267,7 @@ } } - GlobalServiceProvider.Get().Debug("HTMLPage: GetInternal encoding: {0}", _pageEncodingMessage); + Log.Debug("HTMLPage: GetInternal encoding: {0}", _pageEncodingMessage); // Encoding: depends on selected page if (string.IsNullOrEmpty(_strPageSource) || strEncode.ToLower() != _defaultEncode) { @@ -284,7 +285,7 @@ } _error = Page.GetError(); if (!string.IsNullOrEmpty(_error)) - GlobalServiceProvider.Get().Error("HTMLPage: GetInternal error: {0}", _error); + Log.Error("HTMLPage: GetInternal error: {0}", _error); return false; } }