Skip to content

Commit

Permalink
Added cee formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
fireboy1919 committed Jun 17, 2015
1 parent 6a0aad2 commit 95e111e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/logstash-logger/cee_formatter.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require 'logger'
require 'logstash-logger/formatter'

module LogStashLogger
class CeeFormatter < LogStashLogger::Formatter
def call(severity, time, progname, message)
event = build_event(message, severity, time)
"#{event['host']} #{progname}:@cee: #{event.to_json}\n"
end
end
end

0 comments on commit 95e111e

Please sign in to comment.