librsync  2.0.2
Macros | Enumerations | Functions | Variables
trace.h File Reference

Go to the source code of this file.

Macros

#define FMT_LONG   "%"PRIdMAX
 
#define FMT_WEAKSUM   "%08"PRIx32
 
#define FMT_SIZE   "%Iu"
 
#define rs_trace   rs_trace0
 
#define rs_fatal   rs_fatal0
 
#define rs_error   rs_error0
 
#define rs_log   rs_log0_nofn
 
#define rs_trace_enabled()   0
 

Enumerations

enum  { RS_LOG_PRIMASK = 7, RS_LOG_NONAME = 8 }
 

Functions

void rs_trace0 (char const *s,...)
 
void rs_fatal0 (char const *s,...)
 
void rs_error0 (char const *s,...)
 
void rs_log0 (int level, char const *fn, char const *fmt,...)
 
void rs_log0_nofn (int level, char const *fmt,...)
 

Variables

int rs_trace_level
 \macro rs_trace_enabled() More...
 

Detailed Description

logging functions.

trace may be turned off.

error is always on, but you can return and continue in some way.

fatal terminates the whole process.

Todo:
A function like perror that includes strerror output. Apache does this by adding flags as well as the severity level which say whether such information should be included.

Definition in file trace.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RS_LOG_PRIMASK 

Mask to extract priority part.

RS_LOG_NONAME 

Don't show function name in message.

Definition at line 87 of file trace.h.

Variable Documentation

◆ rs_trace_level

int rs_trace_level

\macro rs_trace_enabled()

Call this before putting too much effort into generating trace messages.

Definition at line 56 of file trace.c.