Commit 9711ba07 by Đường Sỹ Hoàng

Rails logger

parent b9c20920
Pipeline #251 failed with stages
in 0 seconds
# Load the Rails application.
require_relative 'application'
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
Rails.logger = Logger.new(STDOUT)
config.logger = ActiveSupport::Logger.new("log/#{Rails.env}.log")
......@@ -38,7 +38,8 @@ namespace :job do
position = job_page.css("div#showScroll.box2Detail").css("ul.DetailJobNew").css("li.bgLine1").css("p.fl_left").text
rescue
puts "Skip #{link}"
logger = Rails.logger
logger.info "Skip #{link}"
next
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment