mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #33213 from gkze/master
GCP Logs: send log text as jsonPayload.message instead of jsonPayload.data
This commit is contained in:
commit
c2ad549533
1 changed files with 3 additions and 3 deletions
|
@ -61,7 +61,7 @@ type gcplogs struct {
|
||||||
type dockerLogEntry struct {
|
type dockerLogEntry struct {
|
||||||
Instance *instanceInfo `json:"instance,omitempty"`
|
Instance *instanceInfo `json:"instance,omitempty"`
|
||||||
Container *containerInfo `json:"container,omitempty"`
|
Container *containerInfo `json:"container,omitempty"`
|
||||||
Data string `json:"data,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type instanceInfo struct {
|
type instanceInfo struct {
|
||||||
|
@ -219,7 +219,7 @@ func ValidateLogOpts(cfg map[string]string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *gcplogs) Log(m *logger.Message) error {
|
func (l *gcplogs) Log(m *logger.Message) error {
|
||||||
data := string(m.Line)
|
message := string(m.Line)
|
||||||
ts := m.Timestamp
|
ts := m.Timestamp
|
||||||
logger.PutMessage(m)
|
logger.PutMessage(m)
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ func (l *gcplogs) Log(m *logger.Message) error {
|
||||||
Payload: &dockerLogEntry{
|
Payload: &dockerLogEntry{
|
||||||
Instance: l.instance,
|
Instance: l.instance,
|
||||||
Container: l.container,
|
Container: l.container,
|
||||||
Data: data,
|
Message: message,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue