+/*
+ * This file is part of secnet.
+ * See README for full list of copyright holders.
+ *
+ * secnet is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * secnet is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * version 3 along with secnet; if not, see
+ * https://www.gnu.org/licenses/gpl.html.
+ */
#include "secnet.h"
#include <stdio.h>
#include <string.h>
uint32_t message_level=M_WARNING|M_ERR|M_SECURITY|M_FATAL;
struct log_if *system_log=NULL;
-static void vMessageFallback(uint32_t class, const char *message, va_list args)
- FORMAT(printf,2,0);
+FORMAT(printf,2,0)
static void vMessageFallback(uint32_t class, const char *message, va_list args)
{
FILE *dest=stdout;
}
}
+FORMAT(printf,2,0)
static void vMessage(uint32_t class, const char *message, va_list args)
{
va_end(ap);
}
-static void MessageFallback(uint32_t class, const char *message, ...)
- FORMAT(printf,2,3);
+FORMAT(printf,2,3)
static void MessageFallback(uint32_t class, const char *message, ...)
{
va_list ap;
static NORETURN(vfatal(int status, bool_t perror, const char *message,
va_list args));
+FORMAT(printf,3,0)
static void vfatal(int status, bool_t perror, const char *message,
va_list args)
{
struct loglist *next;
};
+FORMAT(printf, 3, 0)
static void log_vmulti(void *sst, int class, const char *message, va_list args)
{
struct loglist *st=sst, *i;
}
}
+FORMAT(printf, 6, 0)
void lg_vperror(struct log_if *lg, const char *desc, struct cloc *loc,
int class, int errnoval, const char *fmt, va_list al)
{
static cstring_t months[]={
"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};
+FORMAT(printf, 3, 0)
static void logfile_vlog(void *sst, int class, const char *message,
va_list args)
{
}
}
-static void logfile_log(void *state, int class, const char *message, ...)
- FORMAT(printf,3,4);
+FORMAT(printf,3,4)
static void logfile_log(void *state, int class, const char *message, ...)
{
va_list ap;