Skip to content

Log safe - #2

Merged
ohoushyar merged 3 commits into
masterfrom
log-safe
Jul 27, 2026
Merged

Log safe#2
ohoushyar merged 3 commits into
masterfrom
log-safe

Conversation

@ohoushyar

Copy link
Copy Markdown
Owner

No description provided.

…. Update usage documentation and tests accordingly.
…functions. Added detailed logging for connection duration, input length, and command execution state. Updated documentation to reflect new logging behavior for successful and incomplete connections.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates tcpserver’s logging behavior to be safer and more operationally useful by avoiding logging raw connection payloads, adding connection-level summary logs, and refining CLI flags to control log verbosity.

Changes:

  • Replace -v/--verbose with -q/--quiet (WARN) and --debug (DEBUG overrides quiet).
  • Add per-connection summary logging with duration/size/process metrics; log per-line length instead of line content.
  • Update flag parsing tests and the behavioral spec to match the new logging/flag behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
SPEC.md Updates CLI and logging behavior spec, including new flag semantics and summary log fields.
main.go Implements quiet/debug flags, safer debug logging (lengths), and deferred connection summaries.
main_test.go Updates/extends flag parsing tests for the new quiet/debug flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread main.go
Comment thread SPEC.md
@ohoushyar
ohoushyar merged commit 40072d2 into master Jul 27, 2026
1 check passed
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.

2 participants