lib/semantic_logger/formatters/syslog.rb in semantic_logger-4.6.1 vs lib/semantic_logger/formatters/syslog.rb in semantic_logger-4.7.0
- old
+ new
@@ -1,9 +1,9 @@
begin
- require 'syslog_protocol'
+ require "syslog_protocol"
rescue LoadError
- raise LoadError.new('Gem syslog_protocol is required for remote logging using the Syslog protocol. Please add the gem "syslog_protocol" to your Gemfile.')
+ raise LoadError, 'Gem syslog_protocol is required for remote logging using the Syslog protocol. Please add the gem "syslog_protocol" to your Gemfile.'
end
module SemanticLogger
module Formatters
class Syslog < Default
@@ -71,10 +71,10 @@
# Create Syslog Packet
def create_syslog_packet(message)
packet = SyslogProtocol::Packet.new
packet.hostname = logger.host
packet.facility = facility
- packet.tag = logger.application.delete(' ')
+ packet.tag = logger.application.delete(" ")
packet.content = message
packet.time = log.time
packet.severity = level_map[log.level]
packet.to_s
end