Class: Narou::Logger

Inherits:
StringIO
  • Object
show all
Includes:
LoggerModule
Defined in:
lib/narou_logger.rb

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

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

#initializeLogger

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

Returns:

  • (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