Fix some formatting and enable pretty panics in non-debug mode. Closes #265
This commit is contained in:
parent
922223d241
commit
3964b6fd89
5
main.go
5
main.go
@ -40,6 +40,7 @@ func main() {
|
||||
debugLevel := strings.ToLower(os.Getenv("DEBUG"))
|
||||
if debugLevel != "0" && debugLevel != "f" && debugLevel != "false" {
|
||||
debug.WriteLogs = true
|
||||
debug.RecoverPrettyPanic = true
|
||||
}
|
||||
if debugLevel == "1" || debugLevel == "t" || debugLevel == "true" {
|
||||
debug.RecoverPrettyPanic = false
|
||||
@ -72,6 +73,10 @@ func main() {
|
||||
os.Exit(3)
|
||||
}
|
||||
|
||||
debug.Print("Config directory:", configDir)
|
||||
debug.Print("Data directory:", dataDir)
|
||||
debug.Print("Cache directory:", cacheDir)
|
||||
debug.Print("Download directory:", downloadDir)
|
||||
|
||||
gmx := NewGomuks(MainUIProvider, configDir, dataDir, cacheDir, downloadDir)
|
||||
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
"crypto/tls"
|
||||
"encoding/gob"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
@ -32,7 +33,6 @@ import (
|
||||
"runtime"
|
||||
dbg "runtime/debug"
|
||||
"time"
|
||||
"errors"
|
||||
|
||||
"maunium.net/go/mautrix"
|
||||
"maunium.net/go/mautrix/crypto/attachment"
|
||||
|
Loading…
Reference in New Issue
Block a user