Add Logging
Built-in Logger
MyApp.start [
Azu::Handler::Logger.new,
# ... other handlers
]Configure Log Level
Azu.configure do |config|
case ENV.fetch("AZU_ENV", "development")
when "production"
config.log.level = Log::Severity::Info
when "test"
config.log.level = Log::Severity::Warn
else
config.log.level = Log::Severity::Debug
end
endCustom Logger Handler
Logging in Endpoints
Log Backends
File Backend
JSON Backend
Multiple Backends
Request Context Logging
Error Logging
Sensitive Data Filtering
Log Rotation
Performance Logging
See Also
Last updated
Was this helpful?
