GRPC C++  1.69.0
log.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_SUPPORT_LOG_H
20 #define GRPC_SUPPORT_LOG_H
21 
23 #include <stdarg.h>
24 #include <stdlib.h> /* for abort() */
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
32 typedef enum gpr_log_severity {
37 
39 #define GPR_DEBUG __FILE__, __LINE__, GPR_LOG_SEVERITY_DEBUG
40 #define GPR_INFO __FILE__, __LINE__, GPR_LOG_SEVERITY_INFO
41 #define GPR_ERROR __FILE__, __LINE__, GPR_LOG_SEVERITY_ERROR
42 
51 GPRAPI void grpc_absl_log(const char* file, int line, gpr_log_severity severity,
52  const char* message_str);
53 
62 GPRAPI void grpc_absl_log_int(const char* file, int line,
63  gpr_log_severity severity,
64  const char* message_str, intptr_t num);
65 
74 GPRAPI void grpc_absl_log_str(const char* file, int line,
75  gpr_log_severity severity,
76  const char* message_str1,
77  const char* message_str2);
78 
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* GRPC_SUPPORT_LOG_H */
GPR_LOG_SEVERITY_DEBUG
@ GPR_LOG_SEVERITY_DEBUG
Definition: log.h:33
GPR_LOG_SEVERITY_INFO
@ GPR_LOG_SEVERITY_INFO
Definition: log.h:34
GPRAPI
#define GPRAPI
Definition: port_platform.h:726
grpc_absl_log_int
GPRAPI void grpc_absl_log_int(const char *file, int line, gpr_log_severity severity, const char *message_str, intptr_t num)
EXPERIMENTAL.
GPR_LOG_SEVERITY_ERROR
@ GPR_LOG_SEVERITY_ERROR
Definition: log.h:35
gpr_log_verbosity_init
GPRAPI void gpr_log_verbosity_init(void)
gpr_log_severity
gpr_log_severity
The severity of a log message - use the #defines below when calling into grpc_absl_log to additionall...
Definition: log.h:32
grpc_absl_log_str
GPRAPI void grpc_absl_log_str(const char *file, int line, gpr_log_severity severity, const char *message_str1, const char *message_str2)
EXPERIMENTAL.
grpc_absl_log
GPRAPI void grpc_absl_log(const char *file, int line, gpr_log_severity severity, const char *message_str)
EXPERIMENTAL.
port_platform.h