system preference
This commit is contained in:
1 parent
62fa589e8a
commit
b198b1a17b
19 files changed
+251
-83
No files matched your search
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
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