Skip to content

Commit

Permalink
Merge pull request #2124 from MushroomObserver/protect-extract-log-fr…
Browse files Browse the repository at this point in the history
…om-non-utf8

Adjust script/extract_log to handle non-utf8 sequences.
  • Loading branch information
pellaea committed May 1, 2024
2 parents 666f0c4 + 7708bd3 commit 40c4cd3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions script/extract_log
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ end

file = "#{app_root}/log/production.log"
File.open(file).readlines.each do |line|
line.scrub! # remove non-utf8 characters
match = line.match(/#(\d+)/)
pid = match[1] if match
if line.match?(/: Started [A-Z]{3,}/)
Expand Down

0 comments on commit 40c4cd3

Please sign in to comment.