Merge pull request 'turn off color logging on android as it's usually accessed over ADB (issue #14)' (#23) from cleanup into trunk
continuous-integration/drone/push Build is passing Details

Reviewed-on: #23
This commit is contained in:
Sarah Jamie Lewis 2021-08-30 17:39:46 +00:00
commit 81d22e08a2
1 changed files with 3 additions and 0 deletions

3
lib.go
View File

@ -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)