Module: CemAcpt::Logging::Formatter
- Defined in:
- lib/cem_acpt/logging/formatter.rb
Defined Under Namespace
Classes: FileFormatter, GithubActionFormatter, JSONFormatter, TextFormatter
Class Method Summary
collapse
Class Method Details
.for(log_format) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/cem_acpt/logging/formatter.rb', line 11
def for(log_format)
formatter = all.find { |f| f.log_format == log_format.downcase.to_sym }
raise "Unknown log format: #{log_format}" unless formatter
formatter.get
end
|
7
8
9
|
# File 'lib/cem_acpt/logging/formatter.rb', line 7
def valid_format?(log_format)
all.any? { |f| f.log_format == log_format.downcase.to_sym }
end
|