A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance.
With the new changes to logging, a default Amber installation produces slightly wonky log output. See below:
There are two issues here:
Standard log messages are repeated.
Log messages from pipelines have a redundant prog parameter. This is because the new Log implementation now supports sources natively, but the relevant amber code still includes the prog parameter twice.
This PR makes a few small changes to improve things:
The prog parameter is only written once, colorized if necessary
The default formatting of pipeline log lines (with a | character separating the source from the msg) is moved from source code up to the configuration file. This gives the user additional flexibility in customizing how log lines are displayed without mucking around in amber source\
Log.builder.clear is added to the default config/logger.cr in order to resolve the double log lines. There is still a brief double log when amber first fires up before the config file is loaded -- there may be a better way to fix this.
Benefits
Cleaner logs! See below for default output with these changes applied:
Possible Drawbacks
Slightly more complex & longer configuration for logging (config/logger.cr)
Description of the Change
With the new changes to logging, a default Amber installation produces slightly wonky log output. See below:
There are two issues here:
prog
parameter. This is because the new Log implementation now supports sources natively, but the relevant amber code still includes theprog
parameter twice.This PR makes a few small changes to improve things:
prog
parameter is only written once, colorized if necessaryLog.builder.clear
is added to the default config/logger.cr in order to resolve the double log lines. There is still a brief double log when amber first fires up before the config file is loaded -- there may be a better way to fix this.Benefits
Cleaner logs! See below for default output with these changes applied:
Possible Drawbacks
Slightly more complex & longer configuration for logging (config/logger.cr)