Created
November 16, 2018 07:07
-
-
Save marzdgzmn/f38b095c15eb737c7a544f46358fef28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Logging | |
module SyncLog | |
def self.included(base) | |
@log_file = Logger.new(log_file, shift_age = 10, formatter: proc {|severity, datetime, progname, msg| "[#{Process.pid}:#{Thread.current.object_id}][#{datetime}] #{severity} -- #{msg}\n"}) | |
end | |
def log_info(msg) | |
log_file.info msg | |
end | |
def log_error(msg) | |
log_file.errror msg | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment