Replace f-string logging with parameterized logging calls#152
Merged
Conversation
Agent-Logs-Url: https://github.com/CyberSecDef/NovelForge/sessions/b5195deb-0b43-45f5-a65e-81ec27858ed0 Co-authored-by: CyberSecDef <17597068+CyberSecDef@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix f-string logging in multiple locations
Replace f-string logging with parameterized logging calls
Apr 8, 2026
CyberSecDef
approved these changes
Apr 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates logging statements to use parameterized logging instead of f-strings, avoiding eager string formatting when the relevant log level is disabled and keeping message templates consistent for downstream log processing.
Changes:
- Replace f-string
logger.info/logger.errorcalls indelete_session()with parameterized logging. - Replace f-string
logger.warningcall inget_llm_log()with parameterized logging.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
novelforge/routes/sessions.py |
Switches session deletion info/error logs to parameterized calls. |
novelforge/__init__.py |
Switches missing-LLM-log warning to a parameterized call. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three log statements used f-strings instead of parameterized logging, causing eager string formatting regardless of log level and breaking structured log grouping by template.
Changes
novelforge/routes/sessions.py: Replace f-strings indelete_session()for the info and error log callsnovelforge/__init__.py: Replace f-string inget_llm_log()for the warning log call