-/* @(#) $Id$ */
+/* @(#) $Id: ./src/shared/debug_op.c, 2011/09/08 dcid Exp $
+ */
/* Copyright (C) 2009 Trend Micro Inc.
* All rights reserved.
va_list args2;
FILE *fp;
-
+
tm = time(NULL);
p = localtime(&tm);
/* Duplicating args */
va_copy(args2, args);
-
+
/* If under chroot, log directly to /logs/ossec.log */
if(chroot_flag == 1)
if(fp)
{
(void)fprintf(fp,"%d/%02d/%02d %02d:%02d:%02d ",
- p->tm_year+1900,p->tm_mon+1,
+ p->tm_year+1900,p->tm_mon+1,
p->tm_mday,p->tm_hour,p->tm_min,p->tm_sec);
(void)vfprintf(fp, msg, args);
#ifdef WIN32
_log(msg, args);
daemon_flag = dbg_tmp;
-
+
va_end(args);
}
void ErrorExit(const char *msg, ...)
{
va_list args;
-
- #ifdef WIN32
+
+ #ifdef WIN32
/* If not MA */
#ifndef MA
WinSetError();
/* Print to stderr */
(void)vfprintf(stderr, msg, args);
-
+
#ifdef WIN32
(void)fprintf(stderr, "\r\n");
#else
(void)fprintf(stderr, "\n");
#endif
-
+
va_end(args);
}