Class: Narou::Logger
- Inherits:
-
StringIO
- Object
- StringIO
- Narou::Logger
show all
- Includes:
- LoggerModule
- Defined in:
- lib/logger.rb
Instance Method Summary
collapse
#capture, #initialize, #save, #silence, #silent, #silent=, #strip_color, #write_console
Instance Method Details
#tty? ⇒ Boolean
107
108
109
|
# File 'lib/logger.rb', line 107
def tty?
STDOUT.tty?
end
|
#write(str) ⇒ Object
98
99
100
101
102
103
104
105
|
# File 'lib/logger.rb', line 98
def write(str)
str = str.to_s
if str.encoding == Encoding::ASCII_8BIT
str.force_encoding(Encoding::UTF_8)
end
super(str)
write_console(str, STDOUT)
end
|