40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# File 'lib/oversip/syslogger_process.rb', line 40
def receive_message string, priority
level = string.getbyte 0
msg = string[1..-1].gsub(/%/,"%%").gsub(/\x00/,"")
case level
when 48 ::Syslog.debug sprintf("%7s %s", "DEBUG:", msg)
when 49 ::Syslog.info sprintf("%7s %s", "INFO:", msg)
when 50 ::Syslog.notice sprintf("%7s %s", "NOTICE:", msg)
when 51 ::Syslog.warning sprintf("%7s %s", "WARN:", msg)
when 52 ::Syslog.err sprintf("%7s %s", "ERROR:", msg)
when 53 ::Syslog.crit sprintf("%7s %s", "CRIT:", msg)
when 54 ::Syslog.alert sprintf("%7s %s", "ALERT:", msg)
when 55 ::Syslog.emerg sprintf("%7s %s", "EMERG:", msg)
else ::Syslog.err sprintf("%7s %s", "UNKNOWN:", msg)
end
end
|