Class: Logger

Inherits:
Object show all
Defined in:
lib/swee/patches/logger.rb

Instance Method Summary collapse

Instance Method Details

#file?Boolean

判断当前日志输出到logfile

Returns:

  • (Boolean)


13
14
15
# File 'lib/swee/patches/logger.rb', line 13

def file?
  instance_variable_get(:@logdev).dev.is_a?(File)
end

#io?Boolean

判断当前日志是否输出到stdout

Returns:

  • (Boolean)


7
8
9
# File 'lib/swee/patches/logger.rb', line 7

def io?
  instance_variable_get(:@logdev).dev === STDOUT
end