Skip to content

Commit 2d7756c

Browse files
committed
Ensure log message always begins at the same position in the line.
The minimum length of the facility field should has been increased to 6 to cover all existing facility names. This will make sure the start of the log line message stays in the same place, no matter where it comes from. Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com>
1 parent d2d8661 commit 2d7756c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/gurt/dlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ void d_vlog(int flags, const char *fmt, va_list ap)
663663

664664
hlen_pt1 = hlen; /* save part 1 length */
665665
if (hlen < sizeof(buf) && mst.oflags & DLOG_FLV_FAC)
666-
hlen += snprintf(buf + hlen, sizeof(buf) - hlen, "%-4s ", facstr);
666+
hlen += snprintf(buf + hlen, sizeof(buf) - hlen, "%-6s ", facstr);
667667
/*
668668
* we expect there is still room (i.e. at least one byte) for a
669669
* message, so this overflow check should never happen, but let's

0 commit comments

Comments
 (0)