Module: GameMachine::Logger
- Defined in:
- lib/game_machine/logger.rb
Constant Summary collapse
- LOGGER =
RJack::SLF4J[ 'game_machine' ]
Instance Method Summary collapse
Instance Method Details
#configure_logging ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/game_machine/logger.rb', line 18 def configure_logging RJack::Logback.configure do console = RJack::Logback::ConsoleAppender.new do |a| end file = RJack::Logback::FileAppender.new(logfile) do |a| end RJack::Logback.root.add_appender( file ) RJack::Logback.root.level = RJack::Logback::INFO end end |
#logfile ⇒ Object
14 15 16 |
# File 'lib/game_machine/logger.rb', line 14 def logfile File.join(ENV['APP_ROOT'], 'log',"#{ENV['GAME_ENV']}.log") end |
#logger ⇒ Object
31 32 33 |
# File 'lib/game_machine/logger.rb', line 31 def logger LOGGER end |
#stdout(message) ⇒ Object
8 9 10 11 12 |
# File 'lib/game_machine/logger.rb', line 8 def stdout() unless ENV['GAME_ENV'] == 'test' print "#{}\n" end end |