Home --> Documentations --> PJLIB Reference
Go to the documentation of this file.
106#define PJ_LOG(level,arg) do { \
107 if (level <= pj_log_get_level()) { \
108 pj_log_wrapper_##level(arg); \
135#if PJ_LOG_MAX_LEVEL >= 1
145PJ_DECL( void) pj_log( const char *sender, int level,
146 const char *format, va_list marker);
186PJ_DECL_DATA( int) pj_log_max_level;
187#define pj_log_get_level() pj_log_max_level
274# define pj_log_set_log_func(func)
284# define pj_log(sender, level, format, marker)
296# define pj_log_set_level(level)
307# define pj_log_set_decor(decor)
317# define pj_log_add_indent(indent)
324# define pj_log_set_indent(indent)
331# define pj_log_get_indent() 0
336# define pj_log_push_indent()
341# define pj_log_pop_indent()
349# define pj_log_set_color(level, color)
356# define pj_log_get_level() 0
363# define pj_log_get_decor() 0
371# define pj_log_get_color(level) 0
377# define pj_log_init() PJ_SUCCESS
399#if PJ_LOG_MAX_LEVEL >= 1
400 #define pj_log_wrapper_1(arg) pj_log_1 arg
402 PJ_DECL( void) pj_log_1( const char *src, const char *format, ...);
404 #define pj_log_wrapper_1(arg)
413#if PJ_LOG_MAX_LEVEL >= 2
414 #define pj_log_wrapper_2(arg) pj_log_2 arg
416 PJ_DECL( void) pj_log_2( const char *src, const char *format, ...);
418 #define pj_log_wrapper_2(arg)
427#if PJ_LOG_MAX_LEVEL >= 3
428 #define pj_log_wrapper_3(arg) pj_log_3 arg
430 PJ_DECL( void) pj_log_3( const char *src, const char *format, ...);
432 #define pj_log_wrapper_3(arg)
441#if PJ_LOG_MAX_LEVEL >= 4
442 #define pj_log_wrapper_4(arg) pj_log_4 arg
444 PJ_DECL( void) pj_log_4( const char *src, const char *format, ...);
446 #define pj_log_wrapper_4(arg)
455#if PJ_LOG_MAX_LEVEL >= 5
456 #define pj_log_wrapper_5(arg) pj_log_5 arg
458 PJ_DECL( void) pj_log_5( const char *src, const char *format, ...);
460 #define pj_log_wrapper_5(arg)
469#if PJ_LOG_MAX_LEVEL >= 6
470 #define pj_log_wrapper_6(arg) pj_log_6 arg
472 PJ_DECL( void) pj_log_6( const char *src, const char *format, ...);
474 #define pj_log_wrapper_6(arg)
int pj_status_t Definition: types.h:68
unsigned int pj_color_t Definition: types.h:273
void pj_log_write(int level, const char *buffer, int len)
void pj_log_set_color(int level, pj_color_t color)
void pj_log_func(int level, const char *data, int len) Definition: log.h:120
void pj_log_add_indent(int indent)
void pj_log(const char *sender, int level, const char *format, va_list marker)
pj_color_t pj_log_get_color(int level)
int pj_log_get_level(void)
pj_log_func * pj_log_get_log_func(void)
int pj_log_get_indent(void)
void pj_log_set_level(int level)
unsigned pj_log_get_decor(void)
pj_status_t pj_log_init(void)
void pj_log_push_indent(void)
void pj_log_pop_indent(void)
void pj_log_set_log_func(pj_log_func *func)
void pj_log_set_indent(int indent)
pj_log_decoration Definition: log.h:70
void pj_log_set_decor(unsigned decor)
@ PJ_LOG_HAS_INDENT Definition: log.h:85
@ PJ_LOG_HAS_DAY_OF_MON Definition: log.h:74
@ PJ_LOG_HAS_TIME Definition: log.h:75
@ PJ_LOG_HAS_NEWLINE Definition: log.h:78
@ PJ_LOG_HAS_YEAR Definition: log.h:72
@ PJ_LOG_HAS_SENDER Definition: log.h:77
@ PJ_LOG_HAS_COLOR Definition: log.h:81
@ PJ_LOG_HAS_LEVEL_TEXT Definition: log.h:82
@ PJ_LOG_HAS_THREAD_SWC Definition: log.h:84
@ PJ_LOG_HAS_MONTH Definition: log.h:73
@ PJ_LOG_HAS_CR Definition: log.h:79
@ PJ_LOG_HAS_MICRO_SEC Definition: log.h:76
@ PJ_LOG_HAS_DAY_NAME Definition: log.h:71
@ PJ_LOG_HAS_THREAD_ID Definition: log.h:83
@ PJ_LOG_HAS_SPACE Definition: log.h:80
#define PJ_BEGIN_DECL Definition: config.h:1284
#define PJ_END_DECL Definition: config.h:1285
void pj_log_1(const char *src, const char *format,...)
void pj_log_4(const char *src, const char *format,...)
void pj_log_2(const char *src, const char *format,...)
void pj_log_3(const char *src, const char *format,...)
Declaration of basic types and utility.
PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.
|