cmd/syncthing: Restore useful levels of traceback on panic

This commit is contained in:
Jakob Borg 2016-09-26 21:14:17 +02:00
parent 467c1b26fb
commit d5a0f91cb4

View File

@ -23,6 +23,7 @@ import (
"path/filepath" "path/filepath"
"regexp" "regexp"
"runtime" "runtime"
"runtime/debug"
"runtime/pprof" "runtime/pprof"
"sort" "sort"
"strconv" "strconv"
@ -280,6 +281,9 @@ func parseCommandLineOptions() RuntimeOptions {
} }
func main() { func main() {
// We want all (our) goroutines in panic traces.
debug.SetTraceback("all")
options := parseCommandLineOptions() options := parseCommandLineOptions()
l.SetFlags(options.logFlags) l.SetFlags(options.logFlags)