Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/log4net/Core/LoggingEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ public LocationInfo LocationInformation
public object MessageObject
{
get { return m_message; }
protected set { m_message = value; }
}

/// <summary>
Expand Down Expand Up @@ -743,7 +744,7 @@ internal void EnsureRepository(ILoggerRepository repository)
/// The collected information is cached for future use.
/// </para>
/// </remarks>
public string RenderedMessage
public virtual string RenderedMessage
{
get
{
Expand Down Expand Up @@ -785,7 +786,7 @@ public string RenderedMessage
/// to be accessed multiple times then the property will be more efficient.
/// </para>
/// </remarks>
public void WriteRenderedMessage(TextWriter writer)
public virtual void WriteRenderedMessage(TextWriter writer)
{
if (m_data.Message != null)
{
Expand Down Expand Up @@ -1357,7 +1358,7 @@ public void FixVolatileData(bool fastButLoose)
/// It is not possible to 'unfix' a field.
/// </para>
/// </remarks>
protected void FixVolatileData(FixFlags flags)
protected virtual void FixVolatileData(FixFlags flags)
{
object forceCreation = null;

Expand Down Expand Up @@ -1641,7 +1642,7 @@ public PropertiesDictionary GetProperties()
/// <summary>
/// The application supplied message of logging event.
/// </summary>
private readonly object m_message;
private object m_message;

/// <summary>
/// The exception that was thrown.
Expand Down
18 changes: 13 additions & 5 deletions src/log4net/Util/SystemStringFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ namespace log4net.Util
public sealed class SystemStringFormat
{
private readonly IFormatProvider m_provider;
private readonly string m_format;
private readonly object[] m_args;

/// <summary>
/// Format
/// </summary>
public string Format { get; set; }

/// <summary>
/// Args
/// </summary>
public object[] Args { get; set; }

#region Constructor

Expand All @@ -50,8 +58,8 @@ public sealed class SystemStringFormat
public SystemStringFormat(IFormatProvider provider, string format, params object[] args)
{
m_provider = provider;
m_format = format;
m_args = args;
Format = format;
Args = args;
}

#endregion Constructor
Expand All @@ -62,7 +70,7 @@ public SystemStringFormat(IFormatProvider provider, string format, params object
/// <returns>the formatted string</returns>
public override string ToString()
{
return StringFormat(m_provider, m_format, m_args);
return StringFormat(m_provider, Format, Args);
}

#region StringFormat
Expand Down