Class: Charyf::Logger
Instance Method Summary collapse
- #flow_request(msg) ⇒ Object
- #flow_response(msg) ⇒ Object
-
#initialize(logdev, shift_age = 0, shift_size = 1048576) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(logdev, shift_age = 0, shift_size = 1048576) ⇒ Logger
Returns a new instance of Logger.
7 8 9 10 11 12 13 14 15 |
# File 'lib/charyf/utils/logger.rb', line 7 def initialize(logdev, shift_age = 0, shift_size = 1048576) super self.datetime_format = '%Y-%m-%d %H:%M:%S' self.formatter = proc do |severity, datetime, progname, msg| "#{datetime} [#{severity}]: #{msg}\n" end end |