summaryrefslogtreecommitdiff
path: root/src/libtipidee/tipidee_log_start.c
blob: b280301f9a4fb6b696c7f4b2db9455497f8975b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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[6] = { PROG, ": info: start" } ;
  size_t m = 2 ;
  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) ;
}