Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,12 @@ protected override void Append(LoggingEvent loggingEvent)

/// <inheritdoc/>
protected override void Append(LoggingEvent[] loggingEvents)
{
Append((IEnumerable<LoggingEvent>)loggingEvents);
}

/// <inheritdoc/>
protected override void Append(IEnumerable<LoggingEvent> loggingEvents)
{
if (!_isActivated)
Comment on lines +517 to 519
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The new Append(IEnumerable<LoggingEvent> loggingEvents) method should ideally include a null check for the loggingEvents parameter before accessing it or checking _isActivated, especially since it is a protected method that could be called by subclasses or directly within the class. Although log4net typically ensures non-null arguments in its pipeline, adding a guard clause improves robustness.

        protected override void Append(IEnumerable<LoggingEvent> loggingEvents)
        {
            if (loggingEvents == null)
            {
                return;
            }
            if (!_isActivated)

{
Expand Down
Loading