Closed alilland closed 3 years ago
class API < Grape::API # ... logger.formatter = GrapeLogging::Formatters::Default.new log_file = File.open('./log/logfile.log', 'a') log_file.sync = true logger Logger.new GrapeLogging::MultiIO.new(STDOUT, log_file) insert_after Rack::Head, GrapeLogging::Middleware::RequestLogger, logger: logger, log_level: :info, include: [ GrapeLogging::Loggers::ClientEnv.new, GrapeLogging::Loggers::RequestHeaders.new ] # ... end
If I am understanding the readme file correctly, I am only able to specify one log log level, is there a way to specify multiple? And if there is, can it be added to the readme , that would be amazing :)
you cannot specify multiple log levels at the same time; though if specify for example DEBUG it will log DEBUG and higher up (so INFO, ERROR etc)
If I am understanding the readme file correctly, I am only able to specify one log log level, is there a way to specify multiple? And if there is, can it be added to the readme , that would be amazing :)