32 lines
		
	
	
		
			704 B
		
	
	
	
		
			Ruby
		
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			704 B
		
	
	
	
		
			Ruby
		
	
	
	
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 |