add flag to force windows to log to console
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
1de7e5bd6a
commit
93776e0ca8
15
main.go
15
main.go
|
@ -52,18 +52,21 @@ func main() {
|
|||
event.NewGetValMessageFromPeer,
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
|
||||
flagDebug := flag.Bool("debug", false, "turn on extra logging. WARNING: THIS MAY EXPOSE PRIVATE INFORMATION IN CONSOLE OUTPUT!")
|
||||
flagLocal := flag.Bool("local", false, "load user interface from the local folder \"qml\" instead of the built-in UI")
|
||||
flagService := flag.Bool("service", false, "run this process as an android service")
|
||||
flagClientUI := flag.Bool("clientui", false, "start the UI as a client of a service app instead of a full app")
|
||||
flagConsole := flag.Bool("console", false, "on windows, force logging to console instead of file")
|
||||
flag.Parse()
|
||||
|
||||
if runtime.GOOS == "windows" && !*flagConsole {
|
||||
filelogger, err := log.NewFile(log.LevelInfo, "cwtch_log.txt")
|
||||
if err == nil {
|
||||
log.SetStd(filelogger)
|
||||
}
|
||||
}
|
||||
log.Infoln("ui main()\n")
|
||||
flagDebug := flag.Bool("debug", false, "turn on extra logging. WARNING: THIS MAY EXPOSE PRIVATE INFORMATION IN CONSOLE OUTPUT!")
|
||||
flagLocal := flag.Bool("local", false, "load user interface from the local folder \"qml\" instead of the built-in UI")
|
||||
flagService := flag.Bool("service", false, "run this process as an android service")
|
||||
flagClientUI := flag.Bool("clientui", false, "start the UI as a client of a service app instead of a full app")
|
||||
flag.Parse()
|
||||
|
||||
if *flagDebug {
|
||||
log.SetLevel(log.LevelDebug)
|
||||
|
|
Reference in New Issue