Replace debug IO.puts statements with Logger in PlayerLive.Show (#2287)#2298
Merged
sydseter merged 4 commits intoOWASP:masterfrom Feb 23, 2026
Merged
Replace debug IO.puts statements with Logger in PlayerLive.Show (#2287)#2298sydseter merged 4 commits intoOWASP:masterfrom
sydseter merged 4 commits intoOWASP:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces debug IO.puts statements with proper Logger calls in the PlayerLive.Show module, addressing technical debt from development. IO.puts writes directly to stdout without log levels, timestamps, or structured logging support, making it unsuitable for production. The changes convert 6 debug statements to appropriate Logger calls with added context (player_id, game_id, dealt_card_id) for better diagnostics.
Changes:
- Added
require Loggerto enable Logger macros - Replaced successful operation messages with
Logger.debug/1for routine vote/continue-vote flows - Replaced failure messages with
Logger.warning/1for failed vote operations - Enhanced log messages to include relevant identifiers for easier troubleshooting
Contributor
Author
|
@sydseter is this good to go ? |
Collaborator
|
@immortal71 Some of your commits are lacking a verified signature. |
9f382bd to
1175d30
Compare
1175d30 to
a0e2289
Compare
Contributor
Author
|
@sydseter done |
Contributor
Author
|
@sydseter waiting for the review !! |
sydseter
approved these changes
Feb 23, 2026
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.
Summary
IO.putsdebug statements incopi.owasp.org/lib/copi_web/live/player_live/show.exrequire LoggerLogger.debug/1for routine vote/continue-vote flow messagesLogger.warning/1for failed vote/continue-vote operationsWhy (Reason)
IO.putsis not suitable for production logging in Elixir apps because it bypasses level-based filtering and logger backends.Changes
IO.puts("Continue vote added successfully")->Logger.debug(...)IO.puts("Continue voting failed")->Logger.warning(...)IO.puts("player has voted")->Logger.debug(...)IO.puts("player hasn't voted")->Logger.debug(...)IO.puts("voted successfully")->Logger.debug(...)IO.puts("voting failed")->Logger.warning(...)All new log messages include relevant identifiers (
player_id,game_id,dealt_card_id) for easier diagnostics.Validation
mix compilepasses incopi.owasp.orgCloses #2287