From 83f6f835b8ced89a4113657cb72e6c3d49a27b22 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Wed, 29 Apr 2015 12:11:34 +1000 Subject: [PATCH] Align per-op log messages. --- connection.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/connection.go b/connection.go index 3f08039..6083b22 100644 --- a/connection.go +++ b/connection.go @@ -65,12 +65,13 @@ func (c *Connection) log( file = "???" } + fileLine := fmt.Sprintf("%v:%v", path.Base(file), line) + // Format the actual message to be printed. msg := fmt.Sprintf( - "Op 0x%08x %v:%v] %v", + "Op 0x%08x %24s] %v", opID, - path.Base(file), - line, + fileLine, fmt.Sprintf(format, v...)) // Print it.