22 |
22 |
23 #include "logger.h" |
23 #include "logger.h" |
24 #include "thermferm.h" |
24 #include "thermferm.h" |
25 #include "futil.h" |
25 #include "futil.h" |
26 #include "xutil.h" |
26 #include "xutil.h" |
|
27 |
|
28 |
|
29 void initlog(char *unit) |
|
30 { |
|
31 char buf[128], *filename; |
|
32 |
|
33 snprintf(buf, 127, "Mode,Air,Beer,Target,Heater,Cooler,Fan,Door"); |
|
34 filename = xstrcpy(unit); |
|
35 filename = xstrcat(filename, (char *)".log"); |
|
36 logger(filename, buf); |
|
37 free(filename); |
|
38 filename = NULL; |
|
39 } |
|
40 |
27 |
41 |
28 |
42 |
29 void logger(char *filename, char *data) |
43 void logger(char *filename, char *data) |
30 { |
44 { |
31 struct timeval now; |
45 struct timeval now; |