mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-21 11:29:51 -05:00
go/cmd/dolt/commands/sqlserver: Fix up logformat for when no connection id is available.
This commit is contained in:
@@ -67,7 +67,12 @@ func (l LogFormat) Format(entry *logrus.Entry) ([]byte, error) {
|
||||
}
|
||||
}
|
||||
|
||||
msg := fmt.Sprintf("%s %s [conn %d] %s {%s}\n", entry.Time.Format(time.RFC3339), lvl, connectionId, entry.Message, dataFormat.String())
|
||||
var msg string
|
||||
if connectionId == nil {
|
||||
msg = fmt.Sprintf("%s %s [no conn] %s {%s}\n", entry.Time.Format(time.RFC3339), lvl, entry.Message, dataFormat.String())
|
||||
} else {
|
||||
msg = fmt.Sprintf("%s %s [conn %d] %s {%s}\n", entry.Time.Format(time.RFC3339), lvl, connectionId, entry.Message, dataFormat.String())
|
||||
}
|
||||
return ([]byte)(msg), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user