system preference

This commit is contained in:
Matt K. Fu committed 2013-04-24 19:21:11 +08:00
1 parent 62fa589e8a
commit b198b1a17b
19 files changed
+251 -83

No files matched your search

BIN
View File
Binary file not shown.
+32
View File
@@ -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