change logger
This commit is contained in:
1 parent
c2331695cd
commit
88d55989de
8 files changed
+8
-36
No files matched your search
@@ -1,32 +0,0 @@
|
||||
class OrbitJobLog < Logger
|
||||
FORMAT = "%m/%d/%Y %H:%M%p: "
|
||||
def initialize
|
||||
case Rails.env
|
||||
when 'production'
|
||||
# Logger::Syslog.new("orbit_routine", Syslog::LOG_LOCAL5)
|
||||
super(Orbit::Application.config.root.to_s+'/log/orbit_job.log','daily')
|
||||
when 'development'
|
||||
super(Orbit::Application.config.root.to_s+'/log/orbit_job.dev.log','daily')
|
||||
end
|
||||
end
|
||||
|
||||
def debug(msg)
|
||||
super(Time.now.strftime()+msg)
|
||||
end
|
||||
|
||||
def info(msg)
|
||||
super(Time.now.strftime(FORMAT)+msg)
|
||||
end
|
||||
|
||||
def warn(msg)
|
||||
super(Time.now.strftime(FORMAT)+msg)
|
||||
end
|
||||
|
||||
def error(msg)
|
||||
super(Time.now.strftime(FORMAT)+msg)
|
||||
end
|
||||
|
||||
def fatal(msg)
|
||||
super(Time.now.strftime(FORMAT)+msg)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user