Skip to content

Add SLF4J logging instrumentation to ArticleQueryService - #22

Closed
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1767908094-add-slf4j-logging-articlequeryservice
Closed

devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1767908094-add-slf4j-logging-articlequeryservice

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jan 8, 2026 •

Copy link
Copy Markdown

Summary

Added SLF4J logging instrumentation to the ArticleQueryService class to provide visibility into method entry and exit points. This includes:

  • Added SLF4J Logger import and static logger declaration
  • Added INFO-level entry logging at the start of each public method with relevant parameters:
    • findById() - logs id parameter
    • findBySlug() - logs slug parameter
    • findRecentArticlesWithCursor() - logs tag, author, favoritedBy parameters
    • findUserFeedWithCursor() - logs user id
    • findRecentArticles() - logs tag, author, favoritedBy, page parameters
    • findUserFeed() - logs user id, page parameters
  • Added INFO-level exit logging before each return statement

Review & Testing Checklist for Human

  • Verify the Page class has a meaningful toString() implementation (it's logged directly in findRecentArticles() and findUserFeed())
  • Consider if INFO level is appropriate for production use - these logs will fire on every article query and could be verbose

Recommended test plan:

  1. Run ./gradlew bootRun to start the server
  2. Hit GET /articles endpoint and verify entry/exit logs appear in console
  3. Test other article endpoints to confirm logging works across all methods

Notes

  • Compilation verified with ./gradlew compileJava --no-daemon - build successful
  • Local testing verified: ran the app and confirmed logging output appears correctly when hitting /articles endpoint (shows Entering findRecentArticles() and Exiting findRecentArticles() with parameters)
  • CI failures are unrelated to this PR - caused by deprecated actions/cache: v2 in the repository's GitHub Actions workflow

Link to Devin run: https://partner-workshops.devinenterprise.com/sessions/a97e43e7b2054073b4d76f71ac0e9d2a

@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration
devin-ai-integration Bot deleted the devin/1767908094-add-slf4j-logging-articlequeryservice branch April 24, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants