Class: Narou::Logger
- Inherits:
-
StringIO
- Object
- StringIO
- Narou::Logger
- Includes:
- LoggerModule
- Defined in:
- lib/narou_logger.rb
Direct Known Subclasses
Constant Summary
Constants included from LoggerModule
Narou::LoggerModule::LOG_FORMAT_FILENAME, Narou::LoggerModule::LOG_FORMAT_TIMESTAMP
Instance Attribute Summary
Attributes included from LoggerModule
#capturing, #format_filename, #format_timestamp, #format_timestamp_disabled, #log_postfix, #logging_enabled, #stream
Instance Method Summary collapse
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
- #tty? ⇒ Boolean
- #write(str) ⇒ Object
Methods included from LoggerModule
#append_log, #capture, #copy_instance, #create_log_dir, #disable_logging, #dup_with_disabled_logging, #embed_timestamp, #error, included, #init_logs, #log_filename, #log_filepath, #logging?, #save, #silence, #silent=, #silent?, #strip_color, #warn, #write_base, #write_console
Constructor Details
#initialize ⇒ Logger
Returns a new instance of Logger.
198 199 200 201 |
# File 'lib/narou_logger.rb', line 198 def initialize super self.stream = STDOUT end |
Instance Method Details
#tty? ⇒ Boolean
208 209 210 |
# File 'lib/narou_logger.rb', line 208 def tty? STDOUT.tty? end |
#write(str) ⇒ Object
203 204 205 206 |
# File 'lib/narou_logger.rb', line 203 def write(str) write_base(str, stream) super(str) end |