Subversion Repositories IRCServ

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 nishi 1
/* $Id: stderr.c 5 2024-08-25 11:58:10Z nishi $ */
2
 
3
#include "../is_log.h"
4
 
5
#include <stdio.h>
6
#include <time.h>
7
 
8
void is_log(const char* msg) {
9
	char date[128];
10
	time_t t = time(NULL);
11
	struct tm* tm = localtime(&t);
12
	strftime(date, 128, "%a %b %d %H:%M:%S %Z %Y", tm);
13
	fprintf(stderr, "[%s] %s\n", date, msg);
14
}