I did discover slight inconsistency with logger configuration introduced in #23. If you have preconfigured logger with formatter, grape_logger will override it.
Here is an example.
class App < Grape::API
log_handler = ::Logger.new(STDOUT)
log_handler.formatter = GrapeLogging::Formatters::Json.new
use GrapeLogging::Middleware::RequestLogger, logger: log_handler
get "/" { status 200 }
end
If you perform request to such an app, it will use GrapeLogging::Formatters::Default because of check in LoggerReporter.
I did discover slight inconsistency with logger configuration introduced in #23. If you have preconfigured logger with formatter, grape_logger will override it.
Here is an example.
If you perform request to such an app, it will use
GrapeLogging::Formatters::Default
because of check inLoggerReporter
.