|
18 | 18 |
|
19 | 19 | // Package grpclog defines logging for grpc. |
20 | 20 | // |
21 | | -// In the default logger, severity level can be set by environment variable |
22 | | -// GRPC_GO_LOG_SEVERITY_LEVEL, verbosity level can be set by |
23 | | -// GRPC_GO_LOG_VERBOSITY_LEVEL. |
24 | | -// |
25 | | -// Per-component severity level can be set by GRPC_GO_COMPONENT_LOG_LEVEL with |
26 | | -// format "component1:LEVEL,component2:LEVEL" (e.g., "dns:error,xds:warning"). |
27 | | -// Component-specific settings take precedence over GRPC_GO_LOG_SEVERITY_LEVEL |
28 | | -// for that component. |
| 21 | +// The default logger is controlled by environment variables. Turn |
| 22 | +// everything on like this: |
| 23 | +// |
| 24 | +// export GRPC_GO_LOG_VERBOSITY_LEVEL=99 |
| 25 | +// export GRPC_GO_LOG_SEVERITY_LEVEL=info |
| 26 | +// |
| 27 | +// Additionally, you can configure log severity levels for individual |
| 28 | +// components using the GRPC_GO_COMPONENT_LOG_LEVEL environment |
| 29 | +// variable. The format is a comma-separated list of component:LEVEL |
| 30 | +// pairs like this: |
| 31 | +// |
| 32 | +// export GRPC_GO_COMPONENT_LOG_LEVEL=dns:ERROR,transport:WARNING |
| 33 | +// |
| 34 | +// When both GRPC_GO_LOG_SEVERITY_LEVEL and GRPC_GO_COMPONENT_LOG_LEVEL |
| 35 | +// are set, component-specific settings take precedence over |
| 36 | +// GRPC_GO_LOG_SEVERITY_LEVEL for the specified components. Components |
| 37 | +// not listed in GRPC_GO_COMPONENT_LOG_LEVEL will use the |
| 38 | +// GRPC_GO_LOG_SEVERITY_LEVEL setting. For example: |
| 39 | +// |
| 40 | +// export GRPC_GO_LOG_SEVERITY_LEVEL=ERROR |
| 41 | +// export GRPC_GO_COMPONENT_LOG_LEVEL=dns:INFO |
| 42 | +// |
| 43 | +// In this case, the dns component will log at INFO level, while all |
| 44 | +// other components will log at ERROR level. |
29 | 45 | package grpclog |
30 | 46 |
|
31 | 47 | import ( |
|
0 commit comments