Commit 815c217e authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(logv): New timestamp format: "YYMMDD HH:MM:SS PID" (was: "YYYY-MM-DD

HH:MM:SS ").
parent cde0da37
/*
* $Id: log.c,v 0.10 1993/10/16 17:46:41 ceder Exp $
* $Id: log.c,v 0.11 1994/04/04 14:19:28 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.10 1993/10/16 17:46:41 ceder Exp $";
static char *rcsid = "$Id: log.c,v 0.11 1994/04/04 14:19:28 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -66,9 +66,9 @@ logv (const char *format, va_list AP)
time(&clock);
t = localtime(&clock);
fprintf(stderr, "%04d-%02d-%02d %02d:%02d:%02d ",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
fprintf(stderr, "%02d%02d%02d %02d:%02d:%02d %d ",
t->tm_year, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec, getpid());
vfprintf(stderr, format, AP);
fflush(stderr);
......@@ -84,9 +84,9 @@ log (const char * format,
time(&clock);
t = localtime(&clock);
fprintf(stderr, "%04d-%02d-%02d %02d:%02d:%02d ",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
fprintf(stderr, "%02d%02d%02d %02d:%02d:%02d %d ",
t->tm_year, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec, getpid());
fprintf(stderr, format, a, b, c, d, e, f, g);
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