- outfd = logfile? logfile : stderr;
- time(&t1);
- tm = localtime(&t1);
- strftime(str, MAXLINE, "%b %d %H:%M:%S", tm);
- fprintf(outfd, "%s ", str);
- if (conf.loglevel_arg <= LL_INFO)
- fprintf(outfd, "%i: ", ll);
- mypid = getpid();
- if (conf.loglevel_arg <= LL_INFO)
- fprintf(outfd, "(%d) ", (int)mypid);
- va_start(argp, fmt);
- vfprintf(outfd, fmt, argp);
- va_end(argp);
+ daemon_set_flag(DF_COLOR_LOG);
+ daemon_set_default_log_colors();
+ for (i = 0; i < conf.log_color_given; i++) {
+ ret = daemon_set_log_color(conf.log_color_arg[i]);
+ if (ret < 0)
+ exit(EXIT_FAILURE);
+ }