Skip to content

Switch Canopy logging to logback.xml-based config #33

Merged
GuilhermeF03 merged 2 commits into
canopyengine:31-colored-console-logs-bleeding-into-filesfrom
DanielSousa01:releases/0.1.0
Mar 6, 2026
Merged

Switch Canopy logging to logback.xml-based config #33
GuilhermeF03 merged 2 commits into
canopyengine:31-colored-console-logs-bleeding-into-filesfrom
DanielSousa01:releases/0.1.0

Conversation

@DanielSousa01

Copy link
Copy Markdown
Collaborator

Replace the previous programmatic Logback setup with an external logback.xml and runtime bootstrap. CanopyLogging now creates per-run log directories, sets LOG_DIR, reloads Logback via JoranConfigurator, prints the startup banner, and sets global MDC/session start time. Added custom Logback helpers: ClassNameDiscriminator and ColoredFieldsConverter, and a new logback.xml that defines console, file, and JSON appenders. Removed the old EngineLogs helper and MdcExcludeConverter and simplified Slf4jLogger field formatting and Logs imports to work with the new configuration. Improves separation of concerns by moving routing/appenders/patterns into XML while keeping directory/session initialization in code. This PR Close Issue #31.

Replace the previous programmatic Logback setup with an external logback.xml and runtime bootstrap. CanopyLogging now creates per-run log directories, sets LOG_DIR, reloads Logback via JoranConfigurator, prints the startup banner, and sets global MDC/session start time. Added custom Logback helpers: ClassNameDiscriminator and ColoredFieldsConverter, and a new logback.xml that defines console, file, and JSON appenders. Removed the old EngineLogs helper and MdcExcludeConverter and simplified Slf4jLogger field formatting and Logs imports to work with the new configuration. Improves separation of concerns by moving routing/appenders/patterns into XML while keeping directory/session initialization in code.
@github-project-automation github-project-automation Bot moved this to Backlog in canopy-tasks Mar 6, 2026
@GuilhermeF03 GuilhermeF03 added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Mar 6, 2026
@GuilhermeF03 GuilhermeF03 added this to the 0.1.0 - Headless Version milestone Mar 6, 2026
@GuilhermeF03 GuilhermeF03 self-requested a review March 6, 2026 21:08

@GuilhermeF03 GuilhermeF03 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GuilhermeF03 GuilhermeF03 merged commit 5e2caed into canopyengine:31-colored-console-logs-bleeding-into-files Mar 6, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in canopy-tasks Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request pull-request topic:logging

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants