Class: TestLogger::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/imagery/vendor/SyslogLogger-1.4.0/test/test_syslog_logger.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Log) initialize(line)

A new instance of Log



51
52
53
54
55
# File 'lib/imagery/vendor/SyslogLogger-1.4.0/test/test_syslog_logger.rb', line 51

def initialize(line)
  @line = line
  /\A(\w+), \[([^#]*)#(\d+)\]\s+(\w+) -- (\w*): ([\x0-\xff]*)/ =~ @line
  @label, @datetime, @pid, @severity, @progname, @msg = $1, $2, $3, $4, $5, $6
end

Instance Attribute Details

- (Object) datetime (readonly)

Returns the value of attribute datetime



50
51
52
# File 'lib/imagery/vendor/SyslogLogger-1.4.0/test/test_syslog_logger.rb', line 50

def datetime
  @datetime
end

- (Object) label (readonly)

Returns the value of attribute label



50
51
52
# File 'lib/imagery/vendor/SyslogLogger-1.4.0/test/test_syslog_logger.rb', line 50

def label
  @label
end

- (Object) line (readonly)

Returns the value of attribute line



50
51
52
# File 'lib/imagery/vendor/SyslogLogger-1.4.0/test/test_syslog_logger.rb', line 50

def line
  @line
end

- (Object) msg (readonly)

Returns the value of attribute msg



50
51
52
# File 'lib/imagery/vendor/SyslogLogger-1.4.0/test/test_syslog_logger.rb', line 50

def msg
  @msg
end

- (Object) pid (readonly)

Returns the value of attribute pid



50
51
52
# File 'lib/imagery/vendor/SyslogLogger-1.4.0/test/test_syslog_logger.rb', line 50

def pid
  @pid
end

- (Object) progname (readonly)

Returns the value of attribute progname



50
51
52
# File 'lib/imagery/vendor/SyslogLogger-1.4.0/test/test_syslog_logger.rb', line 50

def progname
  @progname
end

- (Object) severity (readonly)

Returns the value of attribute severity



50
51
52
# File 'lib/imagery/vendor/SyslogLogger-1.4.0/test/test_syslog_logger.rb', line 50

def severity
  @severity
end