Is it possible for stackdriver to recognise syslog input from k8s?

6/25/2019

Unable to get stack driver to recognize syslog levels. Everything appears as an error despite specifying DEBUG

logwriter, e := syslog.New(syslog.LOG_DEBUG, "myprog")
if e == nil {
    log.SetOutput(logwriter)
}

log.Print("log me")

I am aware of format requirements

if I stdout correct format as json payload stackdriver will magically pick it up and it works for me.

But why can't stackdriver recognize syslog input even if I syslog the json payload?

-- blane
go
kubernetes
syslog

1 Answer

6/26/2019

Syslog is a different protocol.

Try the golang driver.

This is tagged with k8s... if you need your kubernetes logs then just use the exporter. If you're just trying to get pod logs, you can send to STDOUT and the below will forward for you.

-- thisguy123
Source: StackOverflow