mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-15 02:08:08 +08:00
Better log trace
This commit is contained in:
parent
e217066bf6
commit
1b8624f135
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user