GRPC C++  1.69.0
Macros | Typedefs | Enumerations | Functions
log.h File Reference
#include <grpc/support/port_platform.h>
#include <stdarg.h>
#include <stdlib.h>

Go to the source code of this file.

Macros

#define GPR_DEBUG   __FILE__, __LINE__, GPR_LOG_SEVERITY_DEBUG
 Macros to build log contexts at various severity levels. More...
 
#define GPR_INFO   __FILE__, __LINE__, GPR_LOG_SEVERITY_INFO
 
#define GPR_ERROR   __FILE__, __LINE__, GPR_LOG_SEVERITY_ERROR
 

Typedefs

typedef enum gpr_log_severity gpr_log_severity
 The severity of a log message - use the #defines below when calling into grpc_absl_log to additionally supply file and line data. More...
 

Enumerations

enum  gpr_log_severity { GPR_LOG_SEVERITY_DEBUG, GPR_LOG_SEVERITY_INFO, GPR_LOG_SEVERITY_ERROR }
 The severity of a log message - use the #defines below when calling into grpc_absl_log to additionally supply file and line data. More...
 

Functions

GPRAPI void grpc_absl_log (const char *file, int line, gpr_log_severity severity, const char *message_str)
 EXPERIMENTAL. More...
 
GPRAPI void grpc_absl_log_int (const char *file, int line, gpr_log_severity severity, const char *message_str, intptr_t num)
 EXPERIMENTAL. More...
 
GPRAPI void grpc_absl_log_str (const char *file, int line, gpr_log_severity severity, const char *message_str1, const char *message_str2)
 EXPERIMENTAL. More...
 
GPRAPI void gpr_log_verbosity_init (void)
 

Macro Definition Documentation

◆ GPR_DEBUG

#define GPR_DEBUG   __FILE__, __LINE__, GPR_LOG_SEVERITY_DEBUG

Macros to build log contexts at various severity levels.

◆ GPR_ERROR

#define GPR_ERROR   __FILE__, __LINE__, GPR_LOG_SEVERITY_ERROR

◆ GPR_INFO

#define GPR_INFO   __FILE__, __LINE__, GPR_LOG_SEVERITY_INFO

Typedef Documentation

◆ gpr_log_severity

The severity of a log message - use the #defines below when calling into grpc_absl_log to additionally supply file and line data.

Enumeration Type Documentation

◆ gpr_log_severity

The severity of a log message - use the #defines below when calling into grpc_absl_log to additionally supply file and line data.

Enumerator
GPR_LOG_SEVERITY_DEBUG 
GPR_LOG_SEVERITY_INFO 
GPR_LOG_SEVERITY_ERROR 

Function Documentation

◆ gpr_log_verbosity_init()

GPRAPI void gpr_log_verbosity_init ( void  )

◆ grpc_absl_log()

GPRAPI void grpc_absl_log ( const char *  file,
int  line,
gpr_log_severity  severity,
const char *  message_str 
)

EXPERIMENTAL.

API stability not guaranteed. Should only be used from gRPC PHP and RUBY. This will be removed once Ruby and PHP can start using C++ APIs. We would replace this with calls to absl LOG functions. grpc_absl_log is equivalent to ABSL_LOG(severity) << message_str;

◆ 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.

API stability not guaranteed. Should only be used from gRPC PHP and RUBY. This will be removed once Ruby and PHP can start using C++ APIs. We would replace this with calls to absl LOG functions. grpc_absl_log_int is equivalent to ABSL_LOG(severity) << message_str << num;

◆ 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.

API stability not guaranteed. Should only be used from gRPC PHP and RUBY. This will be removed once Ruby and PHP can start using C++ APIs. We would replace this with calls to absl LOG functions. grpc_absl_log_str is equivalent to ABSL_LOG(severity) << message_str1 << message_str2;