Explorar o código

windows log to file

pull/204/head
Dan Ballard hai%!(EXTRA string=%!s(BADINDEX) 6 meses)
pai
achega
2c0925004d
Modificáronse 2 ficheiros con 8 adicións e 2 borrados
  1. 7
    2
      main.go
  2. 1
    0
      windows/debug.bat

+ 7
- 2
main.go Ver ficheiro

@@ -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 Ver ficheiro

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

Loading…
Cancelar
Gardar