diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2023-08-17 16:12:43 +0200 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2023-08-23 13:09:11 +0200 |
commit | 868c7be8f599404a23f1d5178b1ba18379df1132 (patch) | |
tree | 3a6492d047a5a1b0d63b5c6ae719e74e63d347bf /src/ipcpd/unicast/routing/graph.c | |
parent | ab8ee0b24335790e49127b1330f9d7bcca7f6bfa (diff) | |
download | ouroboros-868c7be8f599404a23f1d5178b1ba18379df1132.tar.gz ouroboros-868c7be8f599404a23f1d5178b1ba18379df1132.zip |
include: Add option to prefix logs with an ID
This adds the log_xxx_id() macros to print a logline prefixed with a
64-bit identifier in hex format, for instance:
[2a92d78c2f52b76a] Hello ouroboros!
The ID is assumed to be 8 bytes in big endian format (it uses the
HASH_FMT functions and hashes are stored in big endian byte arrays).
The implementation uses the compiler-specific '##' operator to allow
empty variadics. E.g.
func(arg , ## __VA_ARGS__);
will eat the comma if __VA_ARGS__ is empty and thus allow
func(arg);
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/unicast/routing/graph.c')
0 files changed, 0 insertions, 0 deletions