Skip to content
Snippets Groups Projects
Commit 8dee8e2d authored by Olivier Dion's avatar Olivier Dion Committed by Adrien Béraud
Browse files

logger: Resize arguments buffer to avoid junk

Also, extend padding of function name to 24 characters.

Change-Id: I98b39048152fc65bd9c04112393e47e481498170
parent 1ea9cb1f
Branches
No related tags found
No related merge requests found
......@@ -157,9 +157,9 @@ contextHeader(const char* const file, int line)
}
if (file) {
return fmt::format(FMT_COMPILE("[{: >3d}.{:0<3d}|{: >4}|{: <18s}:{: <4d}]"), secs, milli, tid, stripDirName(file), line);
return fmt::format(FMT_COMPILE("[{: >3d}.{:0<3d}|{: >4}|{: <24s}:{: <4d}] "), secs, milli, tid, stripDirName(file), line);
} else {
return fmt::format(FMT_COMPILE("[{: >3d}.{:0<3d}|{: >4}]"), secs, milli, tid);
return fmt::format(FMT_COMPILE("[{: >3d}.{:0<3d}|{: >4}] "), secs, milli, tid);
}
}
......@@ -184,7 +184,10 @@ formatPrintfArgs(const char* format, va_list ap)
vsnprintf((char*) ret.data(), ret.size(), format, cp);
}
ret.resize(size);
va_end(cp);
return ret;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment