feat(174): Added the yaes-slf4j module#175
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new yaes-slf4j module to back the Log effect with SLF4J, and refactors the core Log API so log level is configured at the handler (Log.run(level)) rather than per-logger. This aligns with Issue #174’s goal of letting users swap logging backends without changing call sites (Log.getLogger(...), logger.info(...), etc.).
Changes:
- Introduce
yaes-slf4jwithSlf4jLog.runand an SLF4J-backedLoggerimplementation, plus tests usingslf4j-simple. - Refactor
yaes-corelogging API: remove per-logger level, move level selection toLog.run(level)(defaultDebug), update affected tests. - Update docs and examples to reflect the new
Log/YaesAppbehavior and document SLF4J integration.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| yaes-slf4j/src/main/scala/in/rcard/yaes/slf4j/Slf4jLog.scala | Adds the SLF4J-backed Log handler (Slf4jLog.run). |
| yaes-slf4j/src/main/scala/in/rcard/yaes/slf4j/Slf4jLogger.scala | Implements Logger by delegating to org.slf4j.Logger with enabled-guards for laziness. |
| yaes-slf4j/src/test/scala/in/rcard/yaes/slf4j/Slf4jLogSpec.scala | Tests delegation, level filtering via backend config, fatal mapping, name propagation, laziness. |
| yaes-slf4j/src/test/resources/simplelogger.properties | Configures slf4j-simple test behavior (default trace; per-logger overrides). |
| yaes-slf4j/README.md | Documents usage and configuration for the new module. |
| yaes-core/src/main/scala/in/rcard/yaes/Log.scala | Moves log level control to Log.run(level); removes per-logger level from API. |
| yaes-core/src/test/scala/in/rcard/yaes/LogSpec.scala | Updates tests to the new handler-level API; adds default-level test. |
| yaes-core/src/main/scala/in/rcard/yaes/YaesApp.scala | Removes Log from YaesApp’s automatic effect stack; updates docs/comments accordingly. |
| yaes-core/src/test/scala/in/rcard/yaes/YaesAppSpec.scala | Updates YaesApp tests to match new effect stack without Log. |
| yaes-http/server/src/test/scala/in/rcard/yaes/http/server/integration/YaesServerSpec.scala | Updates handler wiring to Log.run(level = ...) now that Log.run {} is no longer valid. |
| docs/effects/log.md | Updates Log effect docs for handler-level filtering and SLF4J integration. |
| docs/yaes-app.md | Updates YaesApp docs to reflect that logging is no longer automatically provided. |
| README.md | Adds module to list, documents SLF4J integration, updates Log examples to new API. |
| build.sbt | Adds yaes-slf4j subproject and SLF4J dependencies. |
| CLAUDE.md | Updates repository guidance and removes outdated sections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…gration/YaesServerSpec.scala Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ttps://github.com/rcardin/yaes into 174-add-slf4j-integration-module-for-the-log-effect
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 21 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #174