Skip to content

[TT-17316] Shutdown signal logs do not follow configured logging format#9

Open
MaciekMis wants to merge 1 commit into
masterfrom
TT-17316-shutdown-signal-logs-do-not-follow-configured-logging-format
Open

[TT-17316] Shutdown signal logs do not follow configured logging format#9
MaciekMis wants to merge 1 commit into
masterfrom
TT-17316-shutdown-signal-logs-do-not-follow-configured-logging-format

Conversation

@MaciekMis

Copy link
Copy Markdown

No description provided.

@MaciekMis

Copy link
Copy Markdown
Author

Evaluate changes introduced in https://github.com/TykTechnologies/again/pull/9 Analyze impact of this log removal on other Tyk projects in Tyk ecosystem

`Based on the analysis of the Tyk ecosystem, the removal of log.Println(sig.String()) from the again package in PR #9 is a safe, cosmetic change that does not break any functionality. It simply removes a noisy, unformatted log line.

Here is the detailed impact across the Tyk projects:

  1. tyk (Gateway):
       • This is the only project that directly depends on github.com/TykTechnologies/again.
       • The Gateway uses the again package to handle zero-downtime reloads and process forking (specifically in gateway/server.go and gateway/proxy_muxer.go). When a reload is triggered (e.g., via SIGUSR2), the again package would previously print the signal name using the standard log package.
       • Tyk Gateway uses logrus for its structured logging. The standard log.Println output from the again package simply goes to standard error and is never captured, parsed, or asserted against in Tyk's codebase or its test suite. Removing it will just clean up the standard error output during graceful reloads.

  2. tyk-analytics (Dashboard):
       • The again package is only present as an indirect dependency in go.mod (likely pulled in by a shared library). It is not directly imported or used anywhere in the dashboard codebase.

  3. tyk-pump and tyk-sink:
       • Neither of these projects use the again package. It is not present in their go.mod files or source code.

In conclusion, this log removal will not break any log parsing, monitoring, or tests in the Tyk ecosystem. It successfully removes an unformatted log (like user defined signal 2) that was leaking into the console output during process reloads.

References
tyk/go.mod:22 - Direct dependency declaration in Tyk Gateway.
tyk/gateway/server.go:2266-2269 - Usage of again.ListenFrom for process forking.
tyk/gateway/server.go:2341-2348 - Usage of again.Wait and again.Kill for child process management.
tyk-analytics/go.mod:160 - Indirect dependency declaration in Tyk Analytics.`

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