windows log to file
This commit is contained in:
parent
f029da4c49
commit
2c0925004d
9
main.go
9
main.go
|
@ -37,6 +37,12 @@ func init() {
|
|||
}
|
||||
|
||||
func main() {
|
||||
if runtime.GOOS == "windows" {
|
||||
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")
|
||||
|
@ -54,8 +60,7 @@ func main() {
|
|||
//log.SetLevel(log.LevelDebug)
|
||||
//log.ExcludeFromPattern("connection/connection")
|
||||
//log.ExcludeFromPattern("outbound/3dhauthchannel")
|
||||
//log.ExcludeFromPattern("event/eventmanager")
|
||||
//log.AddNothingExceptFilter("connections/peerserverconnection")
|
||||
//log.AddNothingExceptFilter("event/eventmanager")
|
||||
|
||||
if os.Getenv("CWTCH_FOLDER") != "" {
|
||||
the.CwtchDir = os.Getenv("CWTCH_FOLDER")
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
start "cwtch ui debug mode" ui -debug
|
Reference in New Issue