Class: Gitlab::QA::TestLogger
- Inherits:
-
Object
- Object
- Gitlab::QA::TestLogger
- Defined in:
- lib/gitlab/qa/test_logger.rb
Overview
Common test logger implementation
Constant Summary collapse
- TIME_FORMAT =
"%Y-%m-%d %H:%M:%S"
- LEVEL_COLORS =
{ "DEBUG" => :magenta, "INFO" => :green, "WARN" => :yellow, "ERROR" => :red, "FATAL" => :indianred }.freeze
Class Method Summary collapse
-
.logger(level: :info, source: 'Gitlab QA', path: 'tmp') ⇒ ActiveSupport::Logger
Combined logger instance.
Class Method Details
.logger(level: :info, source: 'Gitlab QA', path: 'tmp') ⇒ ActiveSupport::Logger
Combined logger instance
28 29 30 31 32 33 |
# File 'lib/gitlab/qa/test_logger.rb', line 28 def logger(level: :info, source: 'Gitlab QA', path: 'tmp') console_log = console_logger(level: level, source: source) file_log = file_logger(source: source, path: path) console_log.extend(ActiveSupport::Logger.broadcast(file_log)) end |