mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
Merge pull request #9362 from swordqiu/feature/qj-event-log-splitable
fix(util): update vendor for log
This commit is contained in:
@@ -142,7 +142,7 @@ require (
|
||||
k8s.io/cluster-bootstrap v0.19.3
|
||||
yunion.io/x/executor v0.0.0-20201201131200-44fa553abd9e
|
||||
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769
|
||||
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3
|
||||
yunion.io/x/log v0.0.0-20201210064738-43181789dc74
|
||||
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7
|
||||
yunion.io/x/pkg v0.0.0-20201123083159-ca3aea986ff2
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
|
||||
|
||||
@@ -919,8 +919,8 @@ yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769 h1:LIQ4hhLGQuQK+XxlV+8J
|
||||
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769/go.mod h1:p0nyMqGA/apTxxyLIU/o1k4V7Vujl2O6ey30L594sYE=
|
||||
yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b/go.mod h1:+gauLs73omeJAPlsXcevLsJLKixV+sR/E7WSYTSx1fE=
|
||||
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
|
||||
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3 h1:5Wc5hkB8PtMudmHuzCyok960RuOa9I55imIGrigSdjs=
|
||||
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
|
||||
yunion.io/x/log v0.0.0-20201210064738-43181789dc74 h1:7D+sQ/XaUTUEm+NCrKXOhXBKlzEd0RyS2qZ4vBGjx2o=
|
||||
yunion.io/x/log v0.0.0-20201210064738-43181789dc74/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
|
||||
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7 h1:gjqNa2uQzIEXyySsbvVz0UltTEbGsnFFlvnzOpCfHdo=
|
||||
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7/go.mod h1:0vLkNEhlmA64HViPBAnSTUMrx5QP1CLsxXmxDKQ80tc=
|
||||
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
|
||||
|
||||
Vendored
+1
-1
@@ -1108,7 +1108,7 @@ yunion.io/x/executor/client
|
||||
yunion.io/x/executor/server
|
||||
# yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769
|
||||
yunion.io/x/jsonutils
|
||||
# yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3
|
||||
# yunion.io/x/log v0.0.0-20201210064738-43181789dc74
|
||||
yunion.io/x/log
|
||||
yunion.io/x/log/hooks
|
||||
# yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7
|
||||
|
||||
+3
-9
@@ -165,13 +165,7 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *logrus.Entry, keys
|
||||
}
|
||||
|
||||
func (f *TextFormatter) printNoColored(b *bytes.Buffer, entry *logrus.Entry, keys []string, timestampFormat string) {
|
||||
var levelText string
|
||||
|
||||
if entry.Level != logrus.WarnLevel {
|
||||
levelText = strings.ToUpper(entry.Level.String())
|
||||
} else {
|
||||
levelText = "WARN"
|
||||
}
|
||||
levelText := entry.Level.String()
|
||||
|
||||
prefix := " "
|
||||
message := entry.Message
|
||||
@@ -193,9 +187,9 @@ func (f *TextFormatter) printNoColored(b *bytes.Buffer, entry *logrus.Entry, key
|
||||
}
|
||||
|
||||
if f.ShortTimestamp {
|
||||
fmt.Fprintf(b, "[%s %04d %s]%s"+messageFormat, levelText[:1], miniTS(), caller, prefix, message)
|
||||
fmt.Fprintf(b, "[%s %04d %s]%s"+messageFormat, levelText, miniTS(), caller, prefix, message)
|
||||
} else {
|
||||
fmt.Fprintf(b, "[%s %s %s]%s"+messageFormat, levelText[:1], entry.Time.Format(timestampFormat), caller, prefix, message)
|
||||
fmt.Fprintf(b, "[%s %s %s]%s"+messageFormat, levelText, entry.Time.Format(timestampFormat), caller, prefix, message)
|
||||
}
|
||||
for _, k := range keys {
|
||||
v := entry.Data[k]
|
||||
|
||||
Reference in New Issue
Block a user