wslog: Change log format to display everything

Revert from alternating between function name and file name,
show both instead.
This commit is contained in:
João Valverde 2021-06-14 22:04:02 +01:00 committed by Wireshark GitLab Utility
parent 95396973e7
commit 41fd46310f
1 changed files with 12 additions and 10 deletions

View File

@ -364,21 +364,23 @@ static void log_write_do_work(FILE *fp, gboolean use_color, const char *timestam
else
fprintf(fp, " [%s]", level_str);
if (use_color)
fputs("\033[34m", fp); /* color on */
if (func)
fprintf(fp, " %s()" , func);
else if (file && line >= 0)
fprintf(fp, " (%d)%s", line, file);
if (file && line >= 0)
fprintf(fp, " %s:%d", file, line);
else if (file)
fprintf(fp, " %s", file);
if (use_color)
fputs("\033[0m", fp); /* color off */
fputs(" -- ", fp);
if (func) {
if (use_color) {
fputs("\033[34m", fp); /* color on */
}
fprintf(fp, "%s(): " , func);
if (use_color) {
fputs("\033[0m", fp); /* color off */
}
}
vfprintf(fp, user_format, user_ap);
fputc('\n', fp);
fflush(fp);