How Rails Semantic Logger works out of the box
mainIf no configuration is provided, the gem automatically:
- Writes to
log/<environment>.log(colorized if Rails colorized logging is enabled). - Logs to standard out (
$stdout) when runningrails server. - Logs to standard error (
$stderr) when runningrails console(to prevent log lines from mixing with command return values). - Replaces multi-line Rails request logs with a single structured "Completed" line containing searchable fields like controller, action, status, and duration.