Table of Contents
LOGGING NODUP: no duplicate logging to console, to file, to syslog
Functions
| Name | |
|---|---|
| int | init_nodup_log(size_t max) init the nodup log internal hash table |
| int | empty_nodup_table() empty the nodup table |
| int | dump_nodup_log(char * file) dump the nodup log hash table to a file in human-readable form |
| int | close_nodup_log() close the nodup log session |
| void | _n_nodup_log_indexed(int LEVEL, const char * prefix, const char * file, const char * func, int line, const char * format, ... ) log a message only once per unique prefix and location |
| void | _n_nodup_log(int LEVEL, const char * file, const char * func, int line, const char * format, ... ) log a message only once per unique location |
Defines
| Name | |
|---|---|
| n_nodup_log_indexed(LEVEL, PREF, ...) nodup log indexed macro helper |
|
| n_nodup_log(LEVEL, ...) nodup log macro helper |
Functions Documentation
function init_nodup_log
int init_nodup_log(
size_t max
)
init the nodup log internal hash table
Parameters:
- max the max size of the internal hash table. Leave it to zero to keep the internal value in use ( 1024 )
Return: TRUE or FALSE
initialize the no duplicate logging system
init the nodup log internal hash table
function empty_nodup_table
int empty_nodup_table()
empty the nodup table
Return: TRUE or FALSE
Empty the nodup internal table.
empty the nodup table
function dump_nodup_log
int dump_nodup_log(
char * file
)
dump the nodup log hash table to a file in human-readable form
Parameters:
- file The path and filename to the dump file
Return: TRUE or FALSE
Dump the duplicate error log hash table in a file The table is first written to a temporary file which is then renamed to the final destination and permissions set via rename() and chmod().
dump the nodup log hash table to a file in human-readable form
function close_nodup_log
int close_nodup_log()
close the nodup log session
Return: TRUE or FALSE
Empty nodup logtable and close the no duplicate logging session.
close the nodup log session
function _n_nodup_log_indexed
void _n_nodup_log_indexed(
int LEVEL,
const char * prefix,
const char * file,
const char * func,
int line,
const char * format,
...
)
log a message only once per unique prefix and location
Parameters:
- LEVEL Logging level
- prefix prefix to subgroup logs
- file File containing the emitted log
- func Function emitting the log
- line Line of the log
- format Format and string of the log, printf style
Logging function.
log a message only once per unique prefix and location
log( level , const char *format , ... ) is a macro around _log
function _n_nodup_log
void _n_nodup_log(
int LEVEL,
const char * file,
const char * func,
int line,
const char * format,
...
)
log a message only once per unique location
Parameters:
- LEVEL Logging level
- file File containing the emitted log
- func Function emitting the log
- line Line of the log
- format Format and string of the log, printf style
Logging function.
log a message only once per unique location
log( level , const char *format , ... ) is a macro around _log
Macros Documentation
define n_nodup_log_indexed
#define n_nodup_log_indexed(
__LEVEL__,
__PREF__,
...
)
do { \
_n_nodup_log_indexed(__LEVEL__, __PREF__, __FILE__, __func__, __LINE__, __VA_ARGS__); \
} while (0)
nodup log indexed macro helper
define n_nodup_log
#define n_nodup_log(
__LEVEL__,
...
)
do { \
_n_nodup_log(__LEVEL__, __FILE__, __func__, __LINE__, __VA_ARGS__); \
} while (0)
nodup log macro helper
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB