Skip to content

Commit

Permalink
Closes #3019
Browse files Browse the repository at this point in the history
  • Loading branch information
uaalto committed Aug 24, 2015
1 parent 2d748b6 commit 05e2fb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/github.com/getlantern/flashlight/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ var (
// development time, logglyToken will be empty and we won't log to Loggly.
logglyToken string

osVersion = ""

errorOut io.Writer
debugOut io.Writer

Expand Down Expand Up @@ -164,7 +166,7 @@ func enableLoggly(addr string, cloudConfigCA string, instanceId string,
logglyWriter.client.Defaults["hostname"] = "hidden"
logglyWriter.client.Defaults["instanceid"] = instanceId
if osStr, err := osversion.GetHumanReadable(); err == nil {
logglyWriter.client.Defaults["osversion"] = osStr
osVersion = osStr
}
logglyWriter.client.SetHTTPClient(client)
addLoggly(logglyWriter)
Expand Down Expand Up @@ -222,7 +224,7 @@ func (w logglyErrorWriter) Write(b []byte) (int, error) {
"logLevel": "ERROR",
"osName": runtime.GOOS,
"osArch": runtime.GOARCH,
"osVersion": "",
"osVersion": osVersion,
"language": w.lang,
"country": geolookup.GetCountry(),
"timeZone": w.tz,
Expand Down

0 comments on commit 05e2fb6

Please sign in to comment.