Method: AnnoTranslate.log
- Defined in:
- lib/annotranslate.rb
.log ⇒ Object
Plugin-specific Rails logger
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/annotranslate.rb', line 38 def self.log # Create logger if it doesn't exist yet if @@logger.nil? log_file = Rails.root.join('log', 'annotranslate.log').to_s puts "AnnoTranslate is logging to: #{log_file}" @@logger = Logger.new(File.open(log_file, "w", encoding: 'UTF-8')) @@logger.info "Started new AnnoTranslate logging session!" end # Return the logger instance @@logger end |