class Telegram::BotManager::Logger
Constants
- LOG_DIR
Public Class Methods
new(log_file: nil, **args)
click to toggle source
Calls superclass method
# File lib/telegram/bot_manager/logger.rb, line 40 def initialize(log_file: nil, **args) $stdout.sync = true if log_file Dir.mkdir(LOG_DIR) unless Dir.exist?(LOG_DIR) file = File.open("#{LOG_DIR}/#{log_file}", "a") end super(MultiIO.new(STDOUT, file), args) @default_formatter = DefaultFormatter.new end