Class | GELF::Notifier |
In: |
lib/gelf/notifier.rb
|
Parent: | Object |
Graylog2 notifier.
collect_file_and_line | [RW] | |
default_options | [R] | |
enabled | [RW] | |
level | [R] | |
level_mapping | [R] | |
max_chunk_size | [R] | |
rescue_network_errors | [RW] |
host and port are host/ip and port of graylog2-server. max_size is passed to max_chunk_size=. default_options is used in notify!
mapping may be a hash, ‘logger’ (GELF::LOGGER_MAPPING) or ‘direct’ (GELF::DIRECT_MAPPING). Default (compatible) value is ‘logger’.
Same as notify!, but rescues all exceptions (including ArgumentError) and sends them instead.
Sends message to Graylog2 server. args can be:
notify!(:short_message => 'All your rebase are belong to us', :user => 'AlekSi')
notify!(SecurityError.new('ALARM!'), :trespasser => 'AlekSi')
notify!('Plain olde text message', :scribe => 'AlekSi')
Resulted fields are merged with default_options, the latter will never overwrite the former. This method will raise ArgumentError if arguments are wrong. Consider using notify instead.