Skip to content

Clean semantic log identity and improve text output#184

Closed
VolkerChristian wants to merge 1 commit into
masterfrom
codex/clean-semantic-log-identity-and-improve-text-output
Closed

Clean semantic log identity and improve text output#184
VolkerChristian wants to merge 1 commit into
masterfrom
codex/clean-semantic-log-identity-and-improve-text-output

Conversation

@VolkerChristian

Copy link
Copy Markdown
Member

Motivation

  • Remove duplicated connection/instance identity prefixes from semantic log message text where the logger scope already supplies inst=/conn= identity.
  • Keep changes focused on Phase 1 (identity cleanup) to avoid the scope creep experienced in prior work, and defer Phase 2 (text formatting & coloring) until identity cleanup is fully scoped and tested.
  • Provide an automated, honest source-policy test to catch future regressions where identity prefixes are prepended to messages emitted from object-scoped semantic loggers.

Description

  • Removed duplicated identity prefixes from HTTP socket contexts so frameworkLog() messages no longer prepend getSocketConnection()->getConnectionName() and now log the human message text only; changes are in src/web/http/client/SocketContext.cpp and src/web/http/server/SocketContext.cpp.
  • Removed duplicated instance prefixes and duplicated {} format arguments from TLS acceptor/connector and connection shutdown messages so object-scoped this->log() / SocketConnection::log() messages do not pass config->getInstanceName() / Super::getConnectionName() as leading message text; changes are in src/core/socket/stream/tls/SocketAcceptor.hpp, src/core/socket/stream/tls/SocketConnector.hpp, and src/core/socket/stream/tls/SocketConnection.hpp.
  • Added a focused source-policy unit test SemanticIdentityMessagePolicyTest under tests/unit/log/SemanticIdentityMessagePolicyTest.cpp and registered it in the log test CMakeLists.txt to detect obvious duplicated identity prefixes on known object-scoped semantic logger surfaces.
  • Added docs/logging/semantic-identity-message-cleanup-report.md that records the searches performed, files audited, files changed, prefixes removed, intentionally retained occurrences, and follow-up notes about static helper logs.

Testing

  • Configured and built with tests and apps enabled using cmake -S . -B cmake-build -DSNODEC_BUILD_TESTS=ON -DSNODEC_BUILD_APPS=ON and cmake --build cmake-build --parallel 2.
  • Ran targeted unit tests with ctest --test-dir cmake-build -R "SemanticIdentityMessagePolicyTest|Log|Semantic|Logger" --output-on-failure and then the full test set with ctest --test-dir cmake-build --output-on-failure, both completed successfully for the tests that ran in this environment.
  • The new SemanticIdentityMessagePolicyTest passed; the full CTest run reported many repository-gated component tests as Skipped per existing test gating but overall the executed tests passed.
  • Verified git diff --check (no whitespace/check failures) and formatted touched files with clang-format where appropriate.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant