forked from external/yambar
log: dim module name / file name + line number
This commit is contained in:
parent
b3a3990347
commit
47f5c5d655
1 changed files with 4 additions and 0 deletions
4
log.c
4
log.c
|
@ -23,11 +23,15 @@ _log(enum log_class log_class, const char *module, const char *file, int lineno,
|
|||
snprintf(clr, sizeof(clr), "\e[%dm", class_clr);
|
||||
printf("%s%s%s: ", colorize ? clr : "", class, colorize ? "\e[0m" : "");
|
||||
|
||||
if (colorize)
|
||||
printf("\e[2m");
|
||||
#if defined(_DEBUG)
|
||||
printf("%s:%d: ", file, lineno);
|
||||
#else
|
||||
printf("%s: ", module);
|
||||
#endif
|
||||
if (colorize)
|
||||
printf("\e[0m");
|
||||
|
||||
//printf("%%s\n", buf);
|
||||
vprintf(fmt, va);
|
||||
|
|
Loading…
Add table
Reference in a new issue