Skip to content
Snippets Groups Projects
Commit 1c866622 authored by LittleTux89's avatar LittleTux89 Committed by Kurotych Anatolii
Browse files

[*] Timestamp display is enabled when logging events. (#39)

parent af93ece1
No related branches found
No related tags found
No related merge requests found
......@@ -167,15 +167,13 @@ void _vlog_it(const char * log_tag,enum log_level ll, const char * format,va_lis
va_copy(ap2,ap);
if (s_log_file){
time_t t=time(NULL);
struct tm* tmp=localtime(&t);
static char s_time[1024]={0};
strftime(s_time,sizeof(s_time),"%x-%X",tmp);
if (s_log_file ) fprintf(s_log_file,"[%s] ",s_time);
printf("[%s] ",s_time);
}
time_t t=time(NULL);
struct tm* tmp=localtime(&t);
static char s_time[1024]={0};
strftime(s_time,sizeof(s_time),"%x-%X",tmp);
if (s_log_file ) fprintf(s_log_file,"[%s] ",s_time);
printf("[%s] ",s_time);
if(ll==L_DEBUG){
if (s_log_file ) fprintf(s_log_file,"[DBG] ");
......
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