diff --git a/log/stackdriver.go b/log/stackdriver.go index 929df13a..045cd9f2 100644 --- a/log/stackdriver.go +++ b/log/stackdriver.go @@ -106,6 +106,13 @@ func (h *StackdriverLogger) Fire(entry *logrus.Entry) error { Severity: logging.ParseSeverity(entry.Level.String()), } + if p, ok := entry.Data["prefix"]; ok && p == "sql" { + e.Payload = map[string]interface{}{ + "sql": entry.Message, + "vars": entry.Data["vars"], + } + } + for k, v := range entry.Data { switch i := v.(type) { default: