Example #1
0
void log_error(const char *message, ...)
{
    va_list args;
    va_start(args, message);
    vlog_message(LOG_ERR, message, args);
    va_end(args);
}
Example #2
0
File: utils.c Project: MUME/mudlle
void compile_error(const char *msg, ...)
{
  va_list args;
  va_start(args, msg);
  vlog_message(lexer_filename, lexer_nicename, yylineno, false, msg, args);
  va_end(args);
}
Example #3
0
/*
 * Logs the specified message to the debug output
 * file, if specified with the appropriate environment
 * variable.
 */
static void
log_message(const char *prefix, const char *format, /*ARGSUSED*/int count, ...)
{
	va_list ap;
	va_start(ap, count);
	vlog_message(prefix, format, ap);
}
Example #4
0
void
log_message(const int facility, const char *format, ...)
{
	va_list args;

	va_start(args, format);
	vlog_message(facility, format, args);
	va_end(args);
}
Example #5
0
File: utils.c Project: MUME/mudlle
void log_error(const char *msg, ...)
{
  va_list args;
  va_start(args, msg);
  block body = this_mfile ? this_mfile->body : NULL;
  vlog_message(body ? body->filename : NULL,
               body ? body->nicename : NULL,
               yylineno, false, msg, args);
  va_end(args);
}
Example #6
0
void log_message(const char *message, ...)
{
    if (log_verbose)
    {
        va_list args;
        va_start(args, message);
        vlog_message(LOG_INFO, message, args);
        va_end(args);
    }
}
Example #7
0
/*
 * Sends the specified output to stdout.  If logging is enabled,
 * the output will also be sent to the log file.
 */
static void
output_text(const char *format, /*ARGSUSED*/int count, ...)
{
	static Boolean need_prefix = TRUE;
	char *prefix = "OUT";
	va_list ap;
	va_start(ap, count);
	vlog_message(need_prefix?prefix:NULL, format, ap);
	(void) vfprintf(stdout, format, ap);
	if (format[strlen(format) - 1] == '\n') {
		need_prefix = TRUE;
	} else {
		need_prefix = FALSE;
	}
}
Example #8
0
File: utils.c Project: MUME/mudlle
static void vwarning(const char *fname, const char *nname, int line,
                     const char *msg, va_list args)
{
  vlog_message(fname, nname, line, true, msg, args);
}