Commit 5438ee07 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Print only one line for each log message.

parent dd216083
/*
* $Id: log.c,v 0.3 1991/09/15 10:31:36 linus Exp $
* $Id: log.c,v 0.4 1992/08/12 04:11:56 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* File created by ceder 1990-05-25.
*/
static char *rcsid = "$Id: log.c,v 0.3 1991/09/15 10:31:36 linus Exp $";
static char *rcsid = "$Id: log.c,v 0.4 1992/08/12 04:11:56 ceder Exp $";
#include <stdarg.h>
......@@ -56,11 +56,14 @@ extern void
logv (const char *format, va_list AP)
{
time_t clock;
struct tm *t;
time(&clock);
t = localtime(&clock);
fprintf(stderr, "--LOGG-> %s: ", ctime(&clock));
fprintf(stderr, "%4d-%2d-%2d %2d:%2d:%2d ",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
vfprintf(stderr, format, AP);
fflush(stderr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment