Class: Narou::LoggerError
- Inherits:
-
StringIO
- Object
- StringIO
- Narou::LoggerError
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
141
142
143
|
# File 'lib/logger.rb', line 141
def tty?
STDERR.tty?
end
|
#write(str) ⇒ Object
132
133
134
135
136
137
138
139
|
# File 'lib/logger.rb', line 132
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, STDERR)
end
|