Skip to content

Log::Log4perl::Resurrector deletes blank lines before a ###l4p comment #133

Description

@fellowsr

The current regex in Log::Log4perl::Resurrector to match the special ###l4p comments will remove blank lines before the comment as \s* will match newlines as well as whitespace.

This causes line numbers in logs to not match the line in the original source file.

Limited testing suggests replacing the pattern with:-

  # Orig
  #$text =~ s/^\s*###l4p//mg;
  # Patch
  $text =~ s/^[ \t]*###l4p//mg;

fixes this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions