class LSync::MinimalLogFormat
A minimal log format that keeps track of the start time, and prints the minimal amount of information.
Public Class Methods
new()
click to toggle source
# File lib/lsync/tee_logger.rb, line 53 def initialize @start_time = nil end
Public Instance Methods
call(severity, time, progname, msg)
click to toggle source
# File lib/lsync/tee_logger.rb, line 57 def call(severity, time, progname, msg) @start_time ||= time diff = time - @start_time "[T+#{sprintf('%0.1f', diff).ljust(6)} #{severity.rjust(5)}] #{msg}\n" end