ztk 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ztk/logger.rb +2 -2
- data/lib/ztk/version.rb +1 -1
- metadata +1 -1
data/lib/ztk/logger.rb
CHANGED
@@ -83,9 +83,9 @@ module ZTK
|
|
83
83
|
msg = (block && block.call)
|
84
84
|
(msg.nil? || msg.strip.empty?) and return
|
85
85
|
@hostname ||= %x(hostname -s).chomp.strip
|
86
|
-
called_by = parse_caller(caller[1])
|
86
|
+
called_by = "#{@hostname}:#{parse_caller(caller[1])}"
|
87
87
|
message = [message, progname, msg].flatten.compact.join(": ")
|
88
|
-
message = "%19s.%06d|%05d|%5s|%
|
88
|
+
message = "%19s.%06d|%05d|%5s|%60s%s\n" % [Time.now.utc.strftime("%Y-%m-%d|%H:%M:%S"), Time.now.utc.usec, Process.pid, SEVERITIES[severity], called_by, message]
|
89
89
|
|
90
90
|
@logdev.write(message)
|
91
91
|
|
data/lib/ztk/version.rb
CHANGED