Browse Source

windows log to file

pull/204/head
Dan Ballard 3 months ago
parent
commit
2c0925004d
2 changed files with 8 additions and 2 deletions
  1. 7
    2
      main.go
  2. 1
    0
      windows/debug.bat

+ 7
- 2
main.go View File

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

+ 1
- 0
windows/debug.bat View File

@@ -0,0 +1 @@
start "cwtch ui debug mode" ui -debug

Loading…
Cancel
Save