bump version
[prads.git] / src / output-plugins / log_init.c
blob510de11805fc00571af0ffa970fcf1b4af8990d6
1 #include "log_file.h"
2 //#include "log_sguil.h"
4 void init_logging()
6 //if (you want to log to file)
7 //bstring file = bfromcstr("/tmp/prads-asset.log");
8 bstring file = bfromcstr(PRADS_ASSETLOG);
9 init_output_log_file(file);
10 bdestroy(file);
13 //if (you want to log to sguil - FIFO)
14 // bstring sguil = bfromcstr("/tmp/prads-asset.fifo");
15 // init_output_sguil(sguil);
16 // bdestroy(sguil);
21 void end_logging()
23 end_output_log_file ();
26 char *hex2mac(const char *mac)
29 static char buf[32];
31 snprintf(buf, sizeof(buf), "%02X:%02X:%02X:%02X:%02X:%02X",
32 (mac[0] & 0xFF), (mac[1] & 0xFF), (mac[2] & 0xFF),
33 (mac[3] & 0xFF), (mac[4] & 0xFF), (mac[5] & 0xFF));
35 return buf;