Class: InstagramCrawler::Logger
- Inherits:
-
Logger
- Object
- Logger
- InstagramCrawler::Logger
- Defined in:
- lib/instagram_crawler/logger.rb
Class Method Summary collapse
Class Method Details
.info(str) ⇒ Object
15 16 17 |
# File 'lib/instagram_crawler/logger.rb', line 15 def info(str) @logger.info(str) end |
.setting(log) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/instagram_crawler/logger.rb', line 4 def setting(log) io = [STDOUT] io << log_file if log logger = Logger.new(MultiIO.new(*io)) logger.level = Logger::INFO logger.formatter = proc do |_severity, _datetime, _progname, msg| "#{msg}\n" end @logger = logger end |