Consider adding AppLogger#level
Discussion
The following discussion from !41052 (merged) should be addressed:
-
@raju249 started a discussion: (+1 comment) @splattael some test failures on this are due to the missing
.level
method. Do you think we should add the method is this MR?Or should I keep it as before, that is use
Rails.logger.level
and try to fix in other MR when we have the.level
method onGitlab::AppLogger
?
Problem
Currently, we cannot set the logging level for AppLogger
so it's Logger::DEBUG
(or 0
) by default.
Gitlab::AppLogger.loggers.map(&:build).map(&:level) # => [0, 0]
Proposed solution
Implement Gitlab::Applogger#level
and Gitlab::Applogger#level=
and default its level to Rails.logger.level
.