Don't run sprintf when unnecessary.

geesefs-0-30-9
Aaron Jacobs 2015-07-29 15:13:22 +10:00
parent 30cdb148b9
commit 9e84136ee5
1 changed files with 3 additions and 1 deletions

View File

@ -391,7 +391,9 @@ func (c *Connection) ReadOp() (ctx context.Context, op interface{}, err error) {
}
// Choose an ID for this operation for the purposes of logging, and log it.
c.debugLog(inMsg.Header().Unique, 1, "<- %s", describeRequest(op))
if c.debugLogger != nil {
c.debugLog(inMsg.Header().Unique, 1, "<- %s", describeRequest(op))
}
// Special case: handle interrupt requests inline.
if interruptOp, ok := op.(*interruptOp); ok {