Skip to content

Commit

Permalink
format documents #111
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeAndNil committed Mar 5, 2024
1 parent 20e7122 commit 018cb7a
Show file tree
Hide file tree
Showing 176 changed files with 7,109 additions and 7,092 deletions.
60 changes: 30 additions & 30 deletions src/log4net/Appender/AnsiColorTerminalAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,44 +121,44 @@ public enum AnsiAttributes : int
/// <summary>
/// text is bright
/// </summary>
Bright = 1,
Bright = 1,
/// <summary>
/// text is dim
/// </summary>
Dim = 2,
Dim = 2,

/// <summary>
/// text is underlined
/// </summary>
Underscore = 4,
Underscore = 4,

/// <summary>
/// text is blinking
/// </summary>
/// <remarks>
/// Not all terminals support this attribute
/// </remarks>
Blink = 8,
Blink = 8,

/// <summary>
/// text and background colors are reversed
/// </summary>
Reverse = 16,
Reverse = 16,

/// <summary>
/// text is hidden
/// </summary>
Hidden = 32,
Hidden = 32,

/// <summary>
/// text is displayed with a strikethrough
/// </summary>
Strikethrough = 64,
Strikethrough = 64,

/// <summary>
/// text color is light
/// </summary>
Light = 128
Light = 128
}

/// <summary>
Expand All @@ -176,42 +176,42 @@ public enum AnsiColor : int
/// <summary>
/// color is black
/// </summary>
Black = 0,
Black = 0,

/// <summary>
/// color is red
/// </summary>
Red = 1,
Red = 1,

/// <summary>
/// color is green
/// </summary>
Green = 2,
Green = 2,

/// <summary>
/// color is yellow
/// </summary>
Yellow = 3,
Yellow = 3,

/// <summary>
/// color is blue
/// </summary>
Blue = 4,
Blue = 4,

/// <summary>
/// color is magenta
/// </summary>
Magenta = 5,
Magenta = 5,

/// <summary>
/// color is cyan
/// </summary>
Cyan = 6,
Cyan = 6,

/// <summary>
/// color is white
/// </summary>
White = 7
White = 7
}

#endregion
Expand All @@ -225,7 +225,7 @@ public enum AnsiColor : int
/// The instance of the <see cref="AnsiColorTerminalAppender" /> class is set up to write
/// to the standard output stream.
/// </remarks>
public AnsiColorTerminalAppender()
public AnsiColorTerminalAppender()
{
}

Expand Down Expand Up @@ -256,8 +256,8 @@ public virtual string Target
if (SystemInfo.EqualsIgnoringCase(ConsoleError, trimmedTargetName))
{
m_writeToErrorStream = true;
}
else
}
else
{
m_writeToErrorStream = false;
}
Expand Down Expand Up @@ -296,7 +296,7 @@ public void AddMapping(LevelColors mapping)
/// The format of the output will depend on the appender's layout.
/// </para>
/// </remarks>
protected override void Append(log4net.Core.LoggingEvent loggingEvent)
protected override void Append(log4net.Core.LoggingEvent loggingEvent)
{
string loggingMessage = RenderLoggingEvent(loggingEvent);

Expand All @@ -314,26 +314,26 @@ protected override void Append(log4net.Core.LoggingEvent loggingEvent)
// are inserted afterwards.
if (loggingMessage.Length > 1)
{
if (loggingMessage.EndsWith("\r\n") || loggingMessage.EndsWith("\n\r"))
if (loggingMessage.EndsWith("\r\n") || loggingMessage.EndsWith("\n\r"))
{
loggingMessage = loggingMessage.Insert(loggingMessage.Length - 2, PostEventCodes);
}
else if (loggingMessage.EndsWith("\n") || loggingMessage.EndsWith("\r"))
}
else if (loggingMessage.EndsWith("\n") || loggingMessage.EndsWith("\r"))
{
loggingMessage = loggingMessage.Insert(loggingMessage.Length - 1, PostEventCodes);
}
else
}
else
{
loggingMessage = loggingMessage + PostEventCodes;
}
}
else
{
if (loggingMessage[0] == '\n' || loggingMessage[0] == '\r')
if (loggingMessage[0] == '\n' || loggingMessage[0] == '\r')
{
loggingMessage = PostEventCodes + loggingMessage;
}
else
}
else
{
loggingMessage = loggingMessage + PostEventCodes;
}
Expand All @@ -354,7 +354,7 @@ protected override void Append(log4net.Core.LoggingEvent loggingEvent)
Console.Write(loggingMessage);
}
#endif

}

/// <summary>
Expand Down Expand Up @@ -516,7 +516,7 @@ public override void ActivateOptions()
buf.Append("\x1b[0;");

int lightAdjustment = ((m_attributes & AnsiAttributes.Light) > 0) ? 60 : 0;

// set the foreground color
buf.Append(30 + lightAdjustment + (int)m_foreColor);
buf.Append(';');
Expand Down
Loading

0 comments on commit 018cb7a

Please sign in to comment.