summaryrefslogtreecommitdiffstats
path: root/src/YOURLIBNAME/Logger.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-08-31 19:12:31 -0700
committerAndrew <andrewarnott@gmail.com>2008-08-31 19:12:31 -0700
commitba57c42a89f8267db4b2dd8673f23ce826e0b151 (patch)
treee3f03a7f7886f23633b8924652b8e345a9b8f9ea /src/YOURLIBNAME/Logger.cs
parent0e5aee43d849ee0b9e3fbc30cb78671b787d9742 (diff)
downloadDotNetOpenAuth-ba57c42a89f8267db4b2dd8673f23ce826e0b151.zip
DotNetOpenAuth-ba57c42a89f8267db4b2dd8673f23ce826e0b151.tar.gz
DotNetOpenAuth-ba57c42a89f8267db4b2dd8673f23ce826e0b151.tar.bz2
Added StyleCop settings with some suppressed, and accomodated so that we get 0 warnings.
Diffstat (limited to 'src/YOURLIBNAME/Logger.cs')
-rw-r--r--src/YOURLIBNAME/Logger.cs62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/YOURLIBNAME/Logger.cs b/src/YOURLIBNAME/Logger.cs
index c8a4ee9..f316495 100644
--- a/src/YOURLIBNAME/Logger.cs
+++ b/src/YOURLIBNAME/Logger.cs
@@ -1,8 +1,8 @@
-using System;
-using System.Globalization;
-using YOURLIBNAME.Loggers;
-
namespace YOURLIBNAME {
+ using System;
+ using System.Globalization;
+ using YOURLIBNAME.Loggers;
+
/// <summary>
/// A general logger for the entire YOURLIBNAME library.
/// </summary>
@@ -12,17 +12,31 @@ namespace YOURLIBNAME {
/// <see cref="CultureInfo.InvariantCulture"/> is used implicitly.
/// </remarks>
static class Logger {
- static ILog facade = initializeFacade();
+ static ILog facade = InitializeFacade();
- static ILog initializeFacade() {
- ILog result = Log4NetLogger.Initialize() ?? TraceLogger.Initialize() ?? NoOpLogger.Initialize();
- result.Info(Util.LibraryVersion);
- return result;
+ #region ILog Members
+ //// Although this static class doesn't literally implement the ILog interface,
+ //// we implement (mostly) all the same methods in a static way.
+
+ public static bool IsDebugEnabled {
+ get { return facade.IsDebugEnabled; }
}
- #region ILog Members
- // Although this static class doesn't literally implement the ILog interface,
- // we implement (mostly) all the same methods in a static way.
+ public static bool IsInfoEnabled {
+ get { return facade.IsInfoEnabled; }
+ }
+
+ public static bool IsWarnEnabled {
+ get { return facade.IsWarnEnabled; }
+ }
+
+ public static bool IsErrorEnabled {
+ get { return facade.IsErrorEnabled; }
+ }
+
+ public static bool IsFatalEnabled {
+ get { return facade.IsFatalEnabled; }
+ }
public static void Debug(object message) {
facade.Debug(message);
@@ -174,26 +188,12 @@ namespace YOURLIBNAME {
}
*/
- public static bool IsDebugEnabled {
- get { return facade.IsDebugEnabled; }
- }
-
- public static bool IsInfoEnabled {
- get { return facade.IsInfoEnabled; }
- }
-
- public static bool IsWarnEnabled {
- get { return facade.IsWarnEnabled; }
- }
-
- public static bool IsErrorEnabled {
- get { return facade.IsErrorEnabled; }
- }
+ #endregion
- public static bool IsFatalEnabled {
- get { return facade.IsFatalEnabled; }
+ static ILog InitializeFacade() {
+ ILog result = Log4NetLogger.Initialize() ?? TraceLogger.Initialize() ?? NoOpLogger.Initialize();
+ result.Info(Util.LibraryVersion);
+ return result;
}
-
- #endregion
}
}