class Embulk::Slf4jAdapter

Public Class Methods

new(logger) click to toggle source
# File lib/embulk/logger.rb, line 69
def initialize(logger)
  @logger = logger
end

Public Instance Methods

debug(message, &block) click to toggle source
# File lib/embulk/logger.rb, line 103
def debug(message, &block)
  if block
    if @logger.isDebugEnabled
      @logger.debug(block.call)
    end
  else
    @logger.debug(message)
  end
end
debug?() click to toggle source
# File lib/embulk/logger.rb, line 135
def debug?
  @logger.isDebugEnabled()
end
error(message, &block) click to toggle source
# File lib/embulk/logger.rb, line 73
def error(message, &block)
  if block
    if @logger.isErrorEnabled
      @logger.error(block.call)
    end
  else
    @logger.error(message)
  end
end
error?() click to toggle source
# File lib/embulk/logger.rb, line 127
def error?
  @logger.isErrorEnabled()
end
fatal?() click to toggle source
# File lib/embulk/logger.rb, line 123
def fatal?
  @logger.isErrorEnabled()
end
info(message, &block) click to toggle source
# File lib/embulk/logger.rb, line 93
def info(message, &block)
  if block
    if @logger.isInfoEnabled
      @logger.info(block.call)
    end
  else
    @logger.info(message)
  end
end
trace(message, &block) click to toggle source
# File lib/embulk/logger.rb, line 113
def trace(message, &block)
  if block
    if @logger.isTraceEnabled
      @logger.trace(block.call)
    end
  else
    @logger.trace(message)
  end
end
trace?() click to toggle source
# File lib/embulk/logger.rb, line 139
def trace?
  @logger.isTraceEnabled()
end
warn(message, &block) click to toggle source
# File lib/embulk/logger.rb, line 83
def warn(message, &block)
  if block
    if @logger.isWarnEnabled
      @logger.warn(block.call)
    end
  else
    @logger.warn(message)
  end
end
warn?() click to toggle source
# File lib/embulk/logger.rb, line 131
def warn?
  @logger.isWarnEnabled()
end