This patch was authored and released by @tanner0101.
Improves readability of framework log messages and adds API for controlling error logging (#2412).
- Downgraded several instances of
.error
level logging to.debug
.
Note: The developer should have control over all
.error
level logs generated as the result of incoming HTTP requests.
- Added
logLevel
property toDebuggableError
.
Note: This allows
DebuggableError
's to control how they are reported to logs. Vapor's default "route not found" error uses this new API to log at.debug
level.
- Fixed an issue causing stack traces to be included when
logLevel > .trace
.
Note: Stack traces were only meant to be reported at the
.trace
level as they generate significant output.
- Error source information is no longer duplicated in logs.