Skip to content

Commit

Permalink
[api,webui] fix logging of entries with starting newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Oct 8, 2012
1 parent 1e0ac8c commit a3371cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/config/initializers/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def add(severity, message = nil, progname = nil, &block)
color = NUMBER_TO_COLOR_MAP[severity]
message = (message || (block && block.call) || progname).to_s
prefix=""
while message[0] == 13 or message[0] == 10
while message[0].ord == 13 or message[0].ord == 10
prefix = prefix.concat(message[0])
message = message[1..-1]
end
Expand Down
2 changes: 1 addition & 1 deletion src/webui/config/initializers/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def add(severity, message = nil, progname = nil, &block)
color = NUMBER_TO_COLOR_MAP[severity]
message = (message || (block && block.call) || progname).to_s
prefix=""
while message[0] == 13 or message[0] == 10
while message[0].ord == 13 or message[0].ord == 10
prefix = prefix.concat(message[0])
message = message[1..-1]
end
Expand Down

0 comments on commit a3371cf

Please sign in to comment.