class SyslogTls::Message
Message
represents full message that can be sent to syslog
Attributes
header[W]
msg[RW]
structured_data[RW]
Public Class Methods
new()
click to toggle source
# File lib/syslog_tls/protocol.rb, line 115 def initialize @msg = '' @structured_data = [] end
Public Instance Methods
assemble()
click to toggle source
# File lib/syslog_tls/protocol.rb, line 124 def assemble # Start with header out = [header.to_s] # Add message out << msg if msg.length > 0 # Message must end with new line delimiter out.join(' ') + "\n" end
header()
click to toggle source
# File lib/syslog_tls/protocol.rb, line 120 def header @header ||= Header.new end
to_s()
click to toggle source
# File lib/syslog_tls/protocol.rb, line 133 def to_s assemble end