mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-24 11:54:49 +00:00
Better log trace
This commit is contained in:
1 parent
e217066bf6
commit
1b8624f135
2 files changed
+2
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user