diff --git a/Build.ps1 b/Build.ps1
index e1597ee..b152b59 100644
--- a/Build.ps1
+++ b/Build.ps1
@@ -1,6 +1,6 @@
param(
- [String] $majorMinor = "5.6", # 5.6
- [String] $patch = "2", # $env:APPVEYOR_BUILD_VERSION
+ [String] $majorMinor = "5.7", # 5.7
+ [String] $patch = "0", # $env:APPVEYOR_BUILD_VERSION
[String] $customLogger = "", # C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll
[Switch] $notouch,
[String] $project = "ReflectSoftware.Insight.Extensions.Log4Net"
diff --git a/CHANGES.md b/CHANGES.md
index 1c8121f..313882b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,8 @@
## Change Log ##
+#### Version 5.7.0 ####
+ * Updated to ReflectInsight v5.7.0.0
+
#### Version 5.6.2 ####
* Updated to support latest log4net v2.0.8
diff --git a/README.md b/README.md
index 87de3b3..6bd54af 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@
We've added support for the Log4net appender. This allows you to leverage your current investment in log4net, but leverage the power and flexibility that comes with the ReflectInsight viewer. You can view your log4net messages in realtime, in a rich viewer that allows you to filter out and search for what really matters to you.
- The log4net extension supports Log4net v1.2.11.0. However if you need to support an older version, then you will need to download the ReflectInsight Logging Extensions Library from GitHub. You can then reference and rebuild the extension against a specific release of the log4net dll.
+ The log4net extension supports Log4net v2.0.8. However if you need to support an older version, then you will need to download the ReflectInsight Logging Extensions Library from GitHub. You can then reference and rebuild the extension against a specific release of the log4net dll.
## Benefits of ReflectInsight Extensions ##
diff --git a/assets/VersionInfo.cs b/assets/VersionInfo.cs
index 2813483..da93606 100644
--- a/assets/VersionInfo.cs
+++ b/assets/VersionInfo.cs
@@ -7,6 +7,6 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyVersion("5.6.2.1704")]
-[assembly: AssemblyFileVersion("5.6.2.1704")]
-[assembly: AssemblyInformationalVersion("5.6.2")]
+[assembly: AssemblyVersion("5.7.0.1705")]
+[assembly: AssemblyFileVersion("5.7.0.1705")]
+[assembly: AssemblyInformationalVersion("5.7.0")]
diff --git a/src/Log4netAppender.cs b/src/Log4netAppender.cs
index 162b117..5115864 100644
--- a/src/Log4netAppender.cs
+++ b/src/Log4netAppender.cs
@@ -19,15 +19,16 @@
namespace ReflectSoftware.Insight.Extensions.Log4net
{
- ///------------------------------------------------------------------------
- /// Redirect all log4net messages to ReflectInsight.
- ///
- ///------------------------------------------------------------------------
+ ///
+ /// Redirect all log4net messages to ReflectInsight.
+ ///
+ ///
+ ///
public class LogAppender : AppenderSkeleton
{
class ActiveStates
{
- public ReflectInsight RI { get; set; }
+ public IReflectInsight RI { get; set; }
public Boolean DisplayLevel { get; set; }
public Boolean DisplayLocation { get; set; }
}
@@ -40,16 +41,27 @@ class ActiveStates
protected String DisplayLevel { get; set; }
protected String DisplayLocation { get; set; }
- ///--------------------------------------------------------------------
+
+ ///
+ /// Initializes the class.
+ ///
+ ///
+ /// Empty default constructor
+ ///
static LogAppender()
{
FLine = String.Format("{0,40}", String.Empty).Replace(" ", "-");
FSendInternalErrorMethodInfo = typeof(ReflectInsight).GetMethod("SendInternalError", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod);
}
- ///--------------------------------------------------------------------
- /// Initializes a new instance of the class.
- /// Empty default constructor.
- ///--------------------------------------------------------------------
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Empty default constructor.
+ ///
+ /// --------------------------------------------------------------------
+ /// --------------------------------------------------------------------
public LogAppender()
{
InstanceName = String.Empty;
@@ -57,44 +69,62 @@ public LogAppender()
DisplayLocation = String.Empty;
CurrentActiveStates = new ActiveStates();
- RIEventManager.OnServiceConfigChange += DoOnConfigChange;
+ RIEventManager.OnServiceConfigChange += DoOnConfigChange;
}
- ///--------------------------------------------------------------------
+
+ ///
+ /// Raises the Close event.
+ ///
+ ///
+ ///
+ /// Releases any resources allocated within the appender such as file handles,
+ /// network connections, etc.
+ ///
+ ///
+ /// It is a programming error to append to a closed appender.
+ ///
+ ///
protected override void OnClose()
{
RIEventManager.OnServiceConfigChange -= DoOnConfigChange;
base.OnClose();
}
- ///--------------------------------------------------------------------
+
+ ///
+ /// Does the on configuration change.
+ ///
private void DoOnConfigChange()
{
OnConfigChange();
}
- ///--------------------------------------------------------------------
- /// Activates the options.
- ///
+ ///
+ /// Activates the options.
+ ///
///
///
- /// This is part of the delayed object activation
- /// scheme. The method must
- /// be called on this object after the configuration properties have been set. Until
- /// is called this object
- /// is in an undefined state and must not be used.
- ///
+ /// This is part of the delayed object activation
+ /// scheme. The method must
+ /// be called on this object after the configuration properties have been set. Until
+ /// is called this object
+ /// is in an undefined state and must not be used.
+ ///
///
- /// If any of the configuration properties are modified then
- /// must be called again.
- ///
+ /// If any of the configuration properties are modified then
+ /// must be called again.
+ ///
///
- ///
- ///
- ///--------------------------------------------------------------------
+ /// --------------------------------------------------------------------
+ ///
+ /// --------------------------------------------------------------------
public override void ActivateOptions()
{
base.ActivateOptions();
OnConfigChange();
}
- ///--------------------------------------------------------------------
+
+ ///
+ /// Called when [configuration change].
+ ///
private void OnConfigChange()
{
try
@@ -104,7 +134,7 @@ private void OnConfigChange()
ActiveStates states = new ActiveStates();
states.RI = RILogManager.Get(InstanceName) ?? RILogManager.Default;
states.DisplayLevel = String.Compare(DisplayLevel.ToLower().Trim(), "true", false) == 0;
- states.DisplayLocation = String.Compare(DisplayLocation.ToLower().Trim() , "true", false) == 0;
+ states.DisplayLocation = String.Compare(DisplayLocation.ToLower().Trim(), "true", false) == 0;
CurrentActiveStates = states;
}
@@ -114,12 +144,25 @@ private void OnConfigChange()
RIExceptionManager.Publish(ex, "Failed during: LogAppender.OnConfigChange()");
}
}
- ///--------------------------------------------------------------------
- static private Boolean SendInternalError(ReflectInsight ri, MessageType mType, Exception ex)
+
+ ///
+ /// Sends the internal error.
+ ///
+ /// The ri.
+ /// Type of the m.
+ /// The ex.
+ ///
+ static private Boolean SendInternalError(IReflectInsight ri, MessageType mType, Exception ex)
{
return (Boolean)FSendInternalErrorMethodInfo.Invoke(ri, new object[] { mType, ex });
}
- ///--------------------------------------------------------------------
+
+ ///
+ /// Sends the message.
+ ///
+ /// The states.
+ /// Type of the m.
+ /// The logging event.
static private void SendMessage(ActiveStates states, MessageType mType, LoggingEvent loggingEvent)
{
try
@@ -163,7 +206,25 @@ static private void SendMessage(ActiveStates states, MessageType mType, LoggingE
if (!SendInternalError(states.RI, mType, ex)) throw;
}
}
- ///--------------------------------------------------------------------
+
+ ///
+ /// Subclasses of should implement this method
+ /// to perform actual logging.
+ ///
+ /// The event to append.
+ ///
+ ///
+ /// A subclass must implement this method to perform
+ /// logging of the .
+ ///
+ /// This method will be called by
+ /// if all the conditions listed for that method are met.
+ ///
+ ///
+ /// To restrict the logging of events in the appender
+ /// override the method.
+ ///
+ ///
protected override void Append(LoggingEvent loggingEvent)
{
ActiveStates states = CurrentActiveStates;
@@ -186,7 +247,7 @@ protected override void Append(LoggingEvent loggingEvent)
}
else if (loggingEvent.Level == Level.Trace)
{
- mType = MessageType.SendTrace;
+ mType = MessageType.SendTrace;
}
else if (loggingEvent.Level == Level.Debug
|| loggingEvent.Level == Level.Log4Net_Debug)
@@ -207,11 +268,11 @@ protected override void Append(LoggingEvent loggingEvent)
else if (loggingEvent.Level == Level.Fatal
|| loggingEvent.Level == Level.Critical)
{
- mType = MessageType.SendFatal;
+ mType = MessageType.SendFatal;
}
else if (loggingEvent.Level == Level.Notice)
{
- mType = MessageType.SendNote;
+ mType = MessageType.SendNote;
}
else if (loggingEvent.Level == Level.Verbose)
{
@@ -220,7 +281,20 @@ protected override void Append(LoggingEvent loggingEvent)
SendMessage(states, mType, loggingEvent);
}
- ///--------------------------------------------------------------------
+
+ ///
+ /// Tests if this appender requires a to be set.
+ ///
+ ///
+ ///
+ /// In the rather exceptional case, where the appender
+ /// implementation admits a layout but can also work without it,
+ /// then the appender should return true.
+ ///
+ ///
+ /// This default implementation always returns false.
+ ///
+ ///
protected override bool RequiresLayout
{
get { return false; }
diff --git a/src/ReflectSoftware.Insight.Extensions.Log4net 4.5.csproj b/src/ReflectSoftware.Insight.Extensions.Log4net 4.5.csproj
index 48679c5..af45af2 100644
--- a/src/ReflectSoftware.Insight.Extensions.Log4net 4.5.csproj
+++ b/src/ReflectSoftware.Insight.Extensions.Log4net 4.5.csproj
@@ -73,9 +73,8 @@
..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll
True
-
- ..\packages\ReflectSoftware.Insight.5.6.1.2\lib\net45\ReflectSoftware.Insight.dll
- True
+
+ ..\packages\ReflectSoftware.Insight.5.7.0.0\lib\net45\ReflectSoftware.Insight.dll
diff --git a/src/ReflectSoftware.Insight.Extensions.Log4net.nuspec b/src/ReflectSoftware.Insight.Extensions.Log4net.nuspec
index 542e0a1..d4ac08f 100644
--- a/src/ReflectSoftware.Insight.Extensions.Log4net.nuspec
+++ b/src/ReflectSoftware.Insight.Extensions.Log4net.nuspec
@@ -23,15 +23,13 @@ You can view your log4net messages in realtime, in a rich viewer that allows you
reflectinsight logging log logfiles events log4net exception handling structured tracing trace debug diagnostic
-
+
-
\ No newline at end of file
diff --git a/src/packages.config b/src/packages.config
index 59a6379..6c8d9e1 100644
--- a/src/packages.config
+++ b/src/packages.config
@@ -2,5 +2,5 @@
-
+
\ No newline at end of file