Project

General

Profile

Actions

Improvement #810

closed

Change logging to file by default

Added by liaham about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Compatible Redmine Version:

Description

Currently, xmera Omnia loggs both to STDOUT and file:

  logfile = Rails.root.join("log", "#{Rails.env}.log")
  console_logger = ActiveSupport::Logger.new(STDOUT)
  file_logger = ActiveSupport::Logger.new(logfile)
  config.logger = console_logger.extend(ActiveSupport::Logger.broadcast(file_logger))
  config.datetime_format = "%Y-%m-%d %H:%M:%S"
  config.log_level = ENV.fetch("LOG_LEVEL", "DEBUG")
  config.log_tags = [:request_id]

This will give to much information when running some rake tasks for example.

Actions

Also available in: Atom PDF