Sha256: 83bd4e3c06bbf407d9324509aee9570a73bb30f1a703f80e82fc5942e69efc00

Contents?: true

Size: 345 Bytes

Versions: 2

Compression:

Stored size: 345 Bytes

Contents

module DaemonLogger
  def init_logger
    return if @logger
    file = File.open(log_file_path, 'a')
    file.sync = true
    @logger = Logger.new(file)
    @logger.level = Logger::DEBUG
    @logger.formatter = Logger::Formatter.new
    @logger.datetime_format = "%y-%m-%d %H:%M:%S.%L"
  end

  def logger
    init_logger
    @logger
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
game-server-0.3.3 lib/daemon_logger.rb
game-server-0.3.2 lib/daemon_logger.rb