Skip to content

Commit 147cb29

Browse files
Pablo Braserorwdaigle
authored andcommitted
I find the original log line useful to keep
1 parent 23d1362 commit 147cb29

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/heroku-log-parser.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def event_data(matching)
6363
event[:msg_id] = interpret_nil(nil)
6464
event[:structured_data] = interpret_nil(matching[7])
6565
event[:message] = interpret_nil(matching[8])
66+
event[:original] = matching[0]
6667
event
6768
end
6869

test/heroku_log_parser_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
msg_id: nil,
1717
structured_data: nil,
1818
message: "Starting process with command `bundle exec rackup config.ru -p 24405`",
19+
original: "<40>1 2012-11-30T06:45:26+00:00 heroku web.3 d.73ea7440-270a-435a-a0ea-adf50b4e5f5a - Starting process with command `bundle exec rackup config.ru -p 24405`",
1920
}]
2021
assert_equal expected, actual
2122
end
@@ -34,6 +35,7 @@
3435
msg_id: nil,
3536
structured_data: nil,
3637
message: "- Started GET \"/2013/02/26/full-text-search-in-your-browser\" for 197.112.207.103 at 2014-07-17 12:59:25 +0000",
38+
original: "<190>1 2014-07-17T12:59:25.223980+00:00 d.8f7a4b11-c323-c764-a74f-89bf4c1100ab app web.2 - - Started GET \"/2013/02/26/full-text-search-in-your-browser\" for 197.112.207.103 at 2014-07-17 12:59:25 +0000",
3739
}, {
3840
priority: 190,
3941
syslog_version: 1,
@@ -44,6 +46,7 @@
4446
msg_id: nil,
4547
structured_data: nil,
4648
message: "- Started GET \"/blog.rss\" for 54.219.13.100 at 2014-07-18 12:59:25 +0000",
49+
original: "<190>1 2014-07-17T12:59:25.239432+00:00 d.8f7a4b11-c323-c764-a74f-89bf4c1100ab app web.1 - - Started GET \"/blog.rss\" for 54.219.13.100 at 2014-07-18 12:59:25 +0000",
4750
}]
4851
assert_equal expected, actual
4952
end

0 commit comments

Comments
 (0)