Better log trace

This commit is contained in:
cpq committed 2021-04-13 21:02:05 +01:00
1 parent e217066bf6
commit 1b8624f135
2 files changed
+2

No files matched your search

+1
View File
@@ -1445,6 +1445,7 @@ bool mg_log_prefix(int level, const char *file, int line, const char *fname) {
int max = LL_INFO;
struct mg_str k, v, s = mg_str(s_spec);
const char *p = strrchr(file, '/');
if (p == NULL) p = strrchr(file, '\\');
p = p == NULL ? file : p + 1;
if (s_fn == NULL) return false;
+1
View File
@@ -23,6 +23,7 @@ bool mg_log_prefix(int level, const char *file, int line, const char *fname) {
int max = LL_INFO;
struct mg_str k, v, s = mg_str(s_spec);
const char *p = strrchr(file, '/');
if (p == NULL) p = strrchr(file, '\\');
p = p == NULL ? file : p + 1;
if (s_fn == NULL) return false;