From 5ee1f55497a4e30322a56f133f897ecde1612967 Mon Sep 17 00:00:00 2001 From: mo Date: Sun, 4 Nov 2018 15:22:16 -0700 Subject: initial commit. --- .../Logging/Log4NetLogging/Log4NetLogger.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/Notepad/Infrastructure/Logging/Log4NetLogging/Log4NetLogger.cs (limited to 'src/Notepad/Infrastructure/Logging/Log4NetLogging/Log4NetLogger.cs') diff --git a/src/Notepad/Infrastructure/Logging/Log4NetLogging/Log4NetLogger.cs b/src/Notepad/Infrastructure/Logging/Log4NetLogging/Log4NetLogger.cs new file mode 100644 index 0000000..5111622 --- /dev/null +++ b/src/Notepad/Infrastructure/Logging/Log4NetLogging/Log4NetLogger.cs @@ -0,0 +1,20 @@ +using System; +using log4net; + +namespace Notepad.Infrastructure.Logging.Log4NetLogging { + public class Log4NetLogger : ILogger { + private readonly ILog log; + + public Log4NetLogger(ILog log) { + this.log = log; + } + + public void Informational(string formattedString, params object[] arguments) { + log.InfoFormat(formattedString, arguments); + } + + public void Error(Exception e) { + log.Error(e.ToString()); + } + } +} \ No newline at end of file -- cgit v1.2.3