diff options
Diffstat (limited to 'src/libtipidee/tipidee_log_start.c')
-rw-r--r-- | src/libtipidee/tipidee_log_start.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libtipidee/tipidee_log_start.c b/src/libtipidee/tipidee_log_start.c new file mode 100644 index 0000000..34284af --- /dev/null +++ b/src/libtipidee/tipidee_log_start.c @@ -0,0 +1,25 @@ +/* ISC license. */ + +#include <stddef.h> + +#include <skalibs/strerr.h> + +#include <tipidee/log.h> + +void tipidee_log_start (uint32_t v, char const *ip, char const *host) +{ + char const *a[5] = { "info: start" } ; + size_t m = 1 ; + if (!(v & TIPIDEE_LOG_START)) return ; + if (v & TIPIDEE_LOG_CLIENTIP) + { + a[m++] = " ip " ; + a[m++] = ip ; + } + if (v & TIPIDEE_LOG_CLIENTHOST) + { + a[m++] = " host " ; + a[m++] = host ; + } + strerr_warnv(a, m) ; +} |