Class: GameLogger
- Inherits:
-
Object
- Object
- GameLogger
- Defined in:
- lib/rora/utils/game_logger.rb
Instance Method Summary collapse
- #debug(message) ⇒ Object
- #info(message) ⇒ Object
-
#initialize ⇒ GameLogger
constructor
A new instance of GameLogger.
Constructor Details
#initialize ⇒ GameLogger
Returns a new instance of GameLogger.
3 4 5 6 7 8 9 |
# File 'lib/rora/utils/game_logger.rb', line 3 def initialize @log = Logger.new(STDOUT) @log.sev_threshold = Logger::INFO @log.formatter = proc do |severity, datetime, progname, msg| "#{datetime}: #{msg}\n" end end |
Instance Method Details
#debug(message) ⇒ Object
11 12 13 |
# File 'lib/rora/utils/game_logger.rb', line 11 def debug @log.debug() end |
#info(message) ⇒ Object
15 16 17 |
# File 'lib/rora/utils/game_logger.rb', line 15 def info @log.info() end |