Skip to content

Add the grpcslog package - #6

Merged
a-menshchikov merged 3 commits into
mainfrom
grpcslog
Nov 6, 2026
Merged

a-menshchikov merged 3 commits into
mainfrom
grpcslog

Conversation

@a-menshchikov

Copy link
Copy Markdown
Member

The grpclog.LoggerV2 implementation that writes the gRPC messages to the slog logger.

The logger is created by the caller and passed to the New constructor, so the level and the format of the records are set in it. The package manages only the verbosity level of the V method: it is taken from the GRPC_GO_LOG_VERBOSITY_LEVEL environment variable or from the WithVerbosity option, and the environment variable takes precedence.

The check is not useful for the tests: the structures of the test helpers
are not optimized for the size, and the reordering of their fields only
makes them harder to read.

The check is still enabled for the production code.
The version is aligned with the one used by the other modules of the
repository.
The grpclog.LoggerV2 implementation that writes the gRPC messages to the
slog logger.

The logger is created by the caller and passed to the New constructor, so
the level and the format of the records are set in it. The package manages
only the verbosity level of the V method: it is taken from the
GRPC_GO_LOG_VERBOSITY_LEVEL environment variable or from the WithVerbosity
option, and the environment variable takes precedence.
@a-menshchikov
a-menshchikov merged commit 9a169a4 into main Nov 6, 2026
23 checks passed
@a-menshchikov
a-menshchikov deleted the grpcslog branch November 6, 2026 18:36
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.

1 participant