Skip to content

[WIP] Refactor logging setup to use named logger#77

Merged
alebmorais merged 1 commit intomainfrom
copilot/refactor-logging-configuration
Nov 25, 2025
Merged

[WIP] Refactor logging setup to use named logger#77
alebmorais merged 1 commit intomainfrom
copilot/refactor-logging-configuration

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

  • Replace logging.basicConfig() with a named logger (logging.getLogger("pi_productivity"))
  • Configure the named logger with the same handlers and format as before
  • Update all logging.info/warning/error calls to use the named logger instance
  • Verify the changes work correctly
  • Run code review
Original prompt

This section details on the original issue you should resolve

<issue_title>medium</issue_title>
<issue_description>medium

Using logging.basicConfig() configures the root logger. This can sometimes cause issues if third-party libraries also try to configure logging, as it's a global configuration. A more robust approach is to create and configure a specific logger for your application, like logger = logging.getLogger("pi_productivity"). This isolates your application's logging configuration and prevents it from affecting or being affected by other libraries. While basicConfig might be acceptable for a simple, standalone application, using a named logger is a better practice for maintainability.

Originally posted by @gemini-code-assist[bot] in #72 (comment)
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@alebmorais alebmorais marked this pull request as ready for review November 25, 2025 18:38
@alebmorais alebmorais merged commit bd66a98 into main Nov 25, 2025
5 of 6 checks passed
Copilot AI requested a review from alebmorais November 25, 2025 18:40
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.

![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)

2 participants