Class: Narou::Logger
- Inherits:
-
StringIO
- Object
- StringIO
- Narou::Logger
show all
- Includes:
- LoggerModule
- Defined in:
- lib/logger.rb
Instance Attribute Summary
Attributes included from LoggerModule
#capturing
Instance Method Summary
collapse
#capture, #copy_instance, #initialize, #save, #silence, #silent, #silent=, #strip_color, #write_console
Instance Method Details
#tty? ⇒ Boolean
124
125
126
|
# File 'lib/logger.rb', line 124
def tty?
STDOUT.tty?
end
|
#write(str) ⇒ Object
115
116
117
118
119
120
121
122
|
# File 'lib/logger.rb', line 115
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
|