diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-10-13 15:50:30 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-11-07 09:54:59 +0100 |
commit | c0426ff10bc9dbc9c64f3d32995feb9262c82148 (patch) | |
tree | d8dd7d7250dfbc279da393eb24297063e92bad5b /log.h | |
parent | 59722031744e76c5619ed5b46b8aae76b01b32ac (diff) | |
download | passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar.gz passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar.bz2 passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar.lz passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar.xz passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar.zst passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.zip |
log: Add vlogmsg()
Currently logmsg() is only available as a variadic function. This is fine
for normal use, but is awkward if we ever want to write wrappers around it
which (for example) add standardised prefix information. To allow that,
add a vlogmsg() function which takes a va_list instead, and implement
logmsg() in terms of it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'log.h')
-rw-r--r-- | log.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -12,6 +12,7 @@ #define LOGFILE_CUT_RATIO 30 /* When full, cut ~30% size */ #define LOGFILE_SIZE_MIN (5UL * MAX(BUFSIZ, PAGE_SIZE)) +void vlogmsg(int pri, const char *format, va_list ap); void logmsg(int pri, const char *format, ...) __attribute__((format(printf, 2, 3))); |