Skip to content
Open
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
4 changes: 2 additions & 2 deletions recipes/color-codes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ incoming message like this:

# Get rid of color codes
mutate {
gsub => ["@message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""]
gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""]
}

will result in the Ruby logs becoming this:

D, [2013-01-17T14:59:52.415396 #10324] DEBUG -- : Product Load (0.8ms) SELECT `product`.* FROM `products` WHERE `products`.`id` = 14 LIMIT 1
D, [2013-01-17T14:59:52.436057 #10324] DEBUG -- : User Load (1.0ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = '123' LIMIT 1

These logs are then more easily grokked as the logs are now in a predictable format.
These logs are then more easily grokked as the logs are now in a predictable format.