class Loog::Tee
- License
- MIT
Copyright - Copyright © 2018-2025 Yegor Bugayenko
Author -
Yegor Bugayenko (yegor256@gmail.com)
This way you can log to console and to the file at the same time.
tee.info(‘Hello, world!’)
tee = Loog::Tee.new(Loog::VERBOSE, file_logger)
require ‘loog/tee’
require ‘loog’
A combiner of a few logs together:
- Copyright © 2018-2025 Yegor Bugayenko
- MIT
def debug(msg)
def debug(msg) @logs.each { |g| g.debug(msg) } end
def debug?
def debug? @logs.any?(&:debug?) end
def error(msg)
def error(msg) @logs.each { |g| g.error(msg) } end
def error?
def error? @logs.any?(&:error?) end
def info(msg)
def info(msg) @logs.each { |g| g.info(msg) } end
def info?
def info? @logs.any?(&:info?) end
def initialize(*logs)
def initialize(*logs) @logs = logs end
def warn(msg)
def warn(msg) @logs.each { |g| g.warn(msg) } end
def warn?
def warn? @logs.any?(&:warn?) end