Skip to content

docs(FAQ): add guidance on handling defer logger.Sync() errors#1532

Open
Mysteriousboy727 wants to merge 1 commit into
uber-go:masterfrom
Mysteriousboy727:docs/faq-sync-error-handling
Open

docs(FAQ): add guidance on handling defer logger.Sync() errors#1532
Mysteriousboy727 wants to merge 1 commit into
uber-go:masterfrom
Mysteriousboy727:docs/faq-sync-error-handling

Conversation

@Mysteriousboy727

Copy link
Copy Markdown

Adds a FAQ entry under the Usage section explaining how to handle
the error from defer logger.Sync().

When logging to stdout/stderr, Sync errors are safe to ignore due
to OS pipe limitations. This PR documents the recommended pattern
for both stdout and file-based sinks.

Closes #1491

@CLAassistant

CLAassistant commented Feb 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Best-Practice to defer logger.Sync()

2 participants