Sha256: f3ccb19384e3775ac2335f3ab6f8817ca5f076d1e7f3d8266f03b7619bea859d

Contents?: true

Size: 892 Bytes

Versions: 4

Compression:

Stored size: 892 Bytes

Contents

Pakyow::Config.register :logger do |config|
  # whether or not pakyow should write to a log
  config.opt :enabled, true

  # the default level to log at
  config.opt :level, :debug

  # whether or not pakyow should log to stdout
  config.opt :stdout, true

  # where the log file should be placed
  config.opt :path, -> { File.join(Pakyow::Config.app.root, 'log') }

  # the name of the log file
  config.opt :filename, 'pakyow.log'

  # whether or not the log file should be synced
  config.opt :sync

  # whether or not the log file should be flushed automatically
  config.opt :auto_flush

  # whether or not the log file should be colorized
  config.opt :colorize
end.env :development do |opts|
  opts.sync = true
  opts.auto_flush = true
  opts.colorize = true
end.env :production do |opts|
  opts.sync = false
  opts.auto_flush = false
  opts.stdout = false
  opts.colorize = false
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pakyow-core-0.11.3 pakyow-core/lib/pakyow/core/config/logger.rb
pakyow-core-0.11.2 pakyow-core/lib/pakyow/core/config/logger.rb
pakyow-core-0.11.1 pakyow-core/lib/pakyow/core/config/logger.rb
pakyow-core-0.11.0 pakyow-core/lib/pakyow/core/config/logger.rb