Skip to content
Snippets Groups Projects
Commit ebd7708d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Include timestamps in file transfer log lines

(emulating the syslog date/timestamp format). Makes debugging file transfer issues easier.
parent c7a80e04
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #867 passed
...@@ -460,8 +460,10 @@ static int lputs(void* cbdata, int level, const char* str) ...@@ -460,8 +460,10 @@ static int lputs(void* cbdata, int level, const char* str)
OutputDebugString(msg); OutputDebugString(msg);
#endif #endif
if(log_fp!=NULL && level <= log_level) if(log_fp!=NULL && level <= log_level) {
fprintf(log_fp,"Xfer %s: %s\n",log_levels[level], str); time_t t = time(NULL);
fprintf(log_fp,"%.15s %s\n", ctime(&t) + 4, str);
}
if(level > LOG_INFO) if(level > LOG_INFO)
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment