Class: Logger
Instance Method Summary collapse
-
#file? ⇒ Boolean
判断当前日志输出到logfile.
-
#io? ⇒ Boolean
判断当前日志是否输出到stdout.
Instance Method Details
#file? ⇒ Boolean
判断当前日志输出到logfile
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
7 8 9 |
# File 'lib/swee/patches/logger.rb', line 7 def io? instance_variable_get(:@logdev).dev === STDOUT end |