Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fellowsr opened this issue Oct 27, 2024 · 0 comments
Open

Comments

@fellowsr
Copy link

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.

@fellowsr fellowsr changed the title Log::Log4perl::Resurrector deleted blank lines before a ###l4p comment Log::Log4perl::Resurrector deletes blank lines before a ###l4p comment Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant