mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 12:55:41 +02:00
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);
|
snprintf(clr, sizeof(clr), "\e[%dm", class_clr);
|
||||||
printf("%s%s%s: ", colorize ? clr : "", class, colorize ? "\e[0m" : "");
|
printf("%s%s%s: ", colorize ? clr : "", class, colorize ? "\e[0m" : "");
|
||||||
|
|
||||||
|
if (colorize)
|
||||||
|
printf("\e[2m");
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
printf("%s:%d: ", file, lineno);
|
printf("%s:%d: ", file, lineno);
|
||||||
#else
|
#else
|
||||||
printf("%s: ", module);
|
printf("%s: ", module);
|
||||||
#endif
|
#endif
|
||||||
|
if (colorize)
|
||||||
|
printf("\e[0m");
|
||||||
|
|
||||||
//printf("%%s\n", buf);
|
//printf("%%s\n", buf);
|
||||||
vprintf(fmt, va);
|
vprintf(fmt, va);
|
||||||
|
|
Loading…
Add table
Reference in a new issue