Browse Source

Merge pull request 'turn off color logging on android as it's usually accessed over ADB (issue #14)' (#23) from cleanup into trunk

Reviewed-on: https://git.openprivacy.ca/cwtch.im/libcwtch-go/pulls/23
upgrade
Sarah Jamie Lewis 3 months ago
parent
commit
81d22e08a2
  1. 3
      lib.go

3
lib.go

@ -81,6 +81,9 @@ func StartCwtch(appDir string, torPath string) int {
log.Errorf("could not create file log: %v\n", err)
}
}
if runtime.GOOS == "android" {
log.SetUseColor(false)
}
log.SetLevel(log.LevelInfo)
if logLevel := os.Getenv("LOG_LEVEL"); strings.ToLower(logLevel) == "debug" {
log.SetLevel(log.LevelDebug)

Loading…
Cancel
Save