gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/grpc/Documentation/log_levels.md (about) 1 # Log Levels 2 3 This document describes the different log levels supported by the grpc-go 4 library, and under what conditions they should be used. 5 6 ### Info 7 8 Info messages are for informational purposes and may aid in the debugging of 9 applications or the gRPC library. 10 11 Examples: 12 - The name resolver received an update. 13 - The balancer updated its picker. 14 - Significant gRPC state is changing. 15 16 At verbosity of 0 (the default), any single info message should not be output 17 more than once every 5 minutes under normal operation. 18 19 ### Warning 20 21 Warning messages indicate problems that are non-fatal for the application, but 22 could lead to unexpected behavior or subsequent errors. 23 24 Examples: 25 - Resolver could not resolve target name. 26 - Error received while connecting to a server. 27 - Lost or corrupt connection with remote endpoint. 28 29 ### Error 30 31 Error messages represent errors in the usage of gRPC that cannot be returned to 32 the application as errors, or internal gRPC-Go errors that are recoverable. 33 34 Internal errors are detected during gRPC tests and will result in test failures. 35 36 Examples: 37 - Invalid arguments passed to a function that cannot return an error. 38 - An internal error that cannot be returned or would be inappropriate to return 39 to the user. 40 41 ### Fatal 42 43 Fatal errors are severe internal errors that are unrecoverable. These lead 44 directly to panics, and are avoided as much as possible. 45 46 Example: 47 - Internal invariant was violated. 48 - User attempted an action that cannot return an error gracefully, but would 49 lead to an invalid state if performed.