Skip to content

Commit

Permalink
Issue getlantern#2959 review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
uaalto committed Aug 18, 2015
1 parent fa5d299 commit 2560e6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/github.com/getlantern/flashlight/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (w logglyErrorWriter) Write(b []byte) (int, error) {
"country": geolookup.GetCountry(),
"timeZone": w.tz,
"version": w.versionToLoggly,
"sessionUserAgents": GetSessionUserAgents(),
"sessionUserAgents": getSessionUserAgents(),
}

// extract last 2 (at most) chunks of fullMessage to message, without prefix,
Expand Down
6 changes: 2 additions & 4 deletions src/github.com/getlantern/flashlight/logging/useragents.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ import (
"sync"
)

type agentsMap map[string]int

var (
userAgents = make(agentsMap)
userAgents = make(map[string]int)
agentsMutex = &sync.Mutex{}
reg = regexp.MustCompile("^Go.*package http$")
)
Expand All @@ -34,7 +32,7 @@ func RegisterUserAgent(agent string) {
}

// getSessionUserAgents returns the
func GetSessionUserAgents() string {
func getSessionUserAgents() string {
agentsMutex.Lock()
defer agentsMutex.Unlock()

Expand Down

0 comments on commit 2560e6b

Please sign in to comment.