19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/ree_lib/packages/ree_logger/package/ree_logger/beans/logger.rb', line 19
def build
appenders = []
if config.levels.file
if is_blank(config.file_path)
raise ArgumentError, "use ENV['LOG_FILE_PATH'] to specify path to log file"
end
appenders << FileAppender.new(
config.levels.file, nil, config.file_path, auto_flush: config.file_auto_flush
)
end
if config.levels.stdout
appenders << StdoutAppender.new(
config.levels.stdout, nil
)
end
build_logger(
appenders,
ENV["APP_NAME"],
RateLimiter.new(
config.rate_limit.interval,
config.rate_limit.max_count
),
config.default_filter_words
)
end
|