using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SuperSocket.SocketBase.Logging { /// /// Log4NetLog /// public class Log4NetLog : ILog { private log4net.ILog m_Log; /// /// Initializes a new instance of the class. /// /// The log. public Log4NetLog(log4net.ILog log) { if (log == null) throw new ArgumentNullException("log"); m_Log = log; } /// /// Gets a value indicating whether this instance is debug enabled. /// /// /// true if this instance is debug enabled; otherwise, false. /// public bool IsDebugEnabled { get { return m_Log.IsDebugEnabled; } } /// /// Gets a value indicating whether this instance is error enabled. /// /// /// true if this instance is error enabled; otherwise, false. /// public bool IsErrorEnabled { get { return m_Log.IsErrorEnabled; } } /// /// Gets a value indicating whether this instance is fatal enabled. /// /// /// true if this instance is fatal enabled; otherwise, false. /// public bool IsFatalEnabled { get { return m_Log.IsFatalEnabled; } } /// /// Gets a value indicating whether this instance is info enabled. /// /// /// true if this instance is info enabled; otherwise, false. /// public bool IsInfoEnabled { get { return m_Log.IsInfoEnabled; } } /// /// Gets a value indicating whether this instance is warn enabled. /// /// /// true if this instance is warn enabled; otherwise, false. /// public bool IsWarnEnabled { get { return m_Log.IsWarnEnabled; } } /// /// Logs the debug message. /// /// The message. public void Debug(object message) { m_Log.Debug(message); } /// /// Logs the debug message. /// /// The message. /// The exception. public void Debug(object message, Exception exception) { m_Log.Debug(message, exception); } /// /// Logs the debug message. /// /// The format. /// The arg0. public void DebugFormat(string format, object arg0) { m_Log.DebugFormat(format, arg0); } /// /// Logs the debug message. /// /// The format. /// The args. public void DebugFormat(string format, params object[] args) { m_Log.DebugFormat(format, args); } /// /// Logs the debug message. /// /// The provider. /// The format. /// The args. public void DebugFormat(IFormatProvider provider, string format, params object[] args) { m_Log.DebugFormat(provider, format, args); } /// /// Logs the debug message. /// /// The format. /// The arg0. /// The arg1. public void DebugFormat(string format, object arg0, object arg1) { m_Log.DebugFormat(format, arg0, arg1); } /// /// Logs the debug message. /// /// The format. /// The arg0. /// The arg1. /// The arg2. public void DebugFormat(string format, object arg0, object arg1, object arg2) { m_Log.DebugFormat(format, arg0, arg1, arg2); } /// /// Logs the error message. /// /// The message. public void Error(object message) { m_Log.Error(message); } /// /// Logs the error message. /// /// The message. /// The exception. public void Error(object message, Exception exception) { m_Log.Error(message, exception); } /// /// Logs the error message. /// /// The format. /// The arg0. public void ErrorFormat(string format, object arg0) { m_Log.ErrorFormat(format, arg0); } /// /// Logs the error message. /// /// The format. /// The args. public void ErrorFormat(string format, params object[] args) { m_Log.ErrorFormat(format, args); } /// /// Logs the error message. /// /// The provider. /// The format. /// The args. public void ErrorFormat(IFormatProvider provider, string format, params object[] args) { m_Log.ErrorFormat(provider, format, args); } /// /// Logs the error message. /// /// The format. /// The arg0. /// The arg1. public void ErrorFormat(string format, object arg0, object arg1) { m_Log.ErrorFormat(format, arg0, arg1); } /// /// Logs the error message. /// /// The format. /// The arg0. /// The arg1. /// The arg2. public void ErrorFormat(string format, object arg0, object arg1, object arg2) { m_Log.ErrorFormat(format, arg0, arg1, arg2); } /// /// Logs the fatal error message. /// /// The message. public void Fatal(object message) { m_Log.Fatal(message); } /// /// Logs the fatal error message. /// /// The message. /// The exception. public void Fatal(object message, Exception exception) { m_Log.Fatal(message, exception); } /// /// Logs the fatal error message. /// /// The format. /// The arg0. public void FatalFormat(string format, object arg0) { m_Log.FatalFormat(format, arg0); } /// /// Logs the fatal error message. /// /// The format. /// The args. public void FatalFormat(string format, params object[] args) { m_Log.FatalFormat(format, args); } /// /// Logs the fatal error message. /// /// The provider. /// The format. /// The args. public void FatalFormat(IFormatProvider provider, string format, params object[] args) { m_Log.FatalFormat(provider, format, args); } /// /// Logs the fatal error message. /// /// The format. /// The arg0. /// The arg1. public void FatalFormat(string format, object arg0, object arg1) { m_Log.FatalFormat(format, arg0, arg1); } /// /// Logs the fatal error message. /// /// The format. /// The arg0. /// The arg1. /// The arg2. public void FatalFormat(string format, object arg0, object arg1, object arg2) { m_Log.FatalFormat(format, arg0, arg1, arg2); } /// /// Logs the info message. /// /// The message. public void Info(object message) { m_Log.Info(message); } /// /// Logs the info message. /// /// The message. /// The exception. public void Info(object message, Exception exception) { m_Log.Info(message, exception); } /// /// Logs the info message. /// /// The format. /// The arg0. public void InfoFormat(string format, object arg0) { m_Log.InfoFormat(format, arg0); } /// /// Logs the info message. /// /// The format. /// The args. public void InfoFormat(string format, params object[] args) { m_Log.InfoFormat(format, args); } /// /// Logs the info message. /// /// The provider. /// The format. /// The args. public void InfoFormat(IFormatProvider provider, string format, params object[] args) { m_Log.InfoFormat(provider, format, args); } /// /// Logs the info message. /// /// The format. /// The arg0. /// The arg1. public void InfoFormat(string format, object arg0, object arg1) { m_Log.InfoFormat(format, arg0, arg1); } /// /// Logs the info message. /// /// The format. /// The arg0. /// The arg1. /// The arg2. public void InfoFormat(string format, object arg0, object arg1, object arg2) { m_Log.InfoFormat(format, arg0, arg1, arg2); } /// /// Logs the warning message. /// /// The message. public void Warn(object message) { m_Log.Warn(message); } /// /// Logs the warning message. /// /// The message. /// The exception. public void Warn(object message, Exception exception) { m_Log.Warn(message, exception); } /// /// Logs the warning message. /// /// The format. /// The arg0. public void WarnFormat(string format, object arg0) { m_Log.WarnFormat(format, arg0); } /// /// Logs the warning message. /// /// The format. /// The args. public void WarnFormat(string format, params object[] args) { m_Log.WarnFormat(format, args); } /// /// Logs the warning message. /// /// The provider. /// The format. /// The args. public void WarnFormat(IFormatProvider provider, string format, params object[] args) { m_Log.WarnFormat(provider, format, args); } /// /// Logs the warning message. /// /// The format. /// The arg0. /// The arg1. public void WarnFormat(string format, object arg0, object arg1) { m_Log.WarnFormat(format, arg0, arg1); } /// /// Logs the warning message. /// /// The format. /// The arg0. /// The arg1. /// The arg2. public void WarnFormat(string format, object arg0, object arg1, object arg2) { m_Log.WarnFormat(format, arg0, arg1, arg2); } } }