Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
/* /*
* $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. * Copyright (C) 1991 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* File created by ceder 1990-05-25. * 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" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -66,9 +66,9 @@ logv (const char *format, va_list AP) ...@@ -66,9 +66,9 @@ logv (const char *format, va_list AP)
time(&clock); time(&clock);
t = localtime(&clock); t = localtime(&clock);
fprintf(stderr, "%04d-%02d-%02d %02d:%02d:%02d ", fprintf(stderr, "%02d%02d%02d %02d:%02d:%02d %d ",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_year, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec); t->tm_hour, t->tm_min, t->tm_sec, getpid());
vfprintf(stderr, format, AP); vfprintf(stderr, format, AP);
fflush(stderr); fflush(stderr);
...@@ -84,9 +84,9 @@ log (const char * format, ...@@ -84,9 +84,9 @@ log (const char * format,
time(&clock); time(&clock);
t = localtime(&clock); t = localtime(&clock);
fprintf(stderr, "%04d-%02d-%02d %02d:%02d:%02d ", fprintf(stderr, "%02d%02d%02d %02d:%02d:%02d %d ",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_year, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec); t->tm_hour, t->tm_min, t->tm_sec, getpid());
fprintf(stderr, format, a, b, c, d, e, f, g); fprintf(stderr, format, a, b, c, d, e, f, g);
fflush(stderr); fflush(stderr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment