mirror of
https://github.com/yusing/godoxy.git
synced 2025-07-26 13:44:03 +02:00
fixed notification not being sent
This commit is contained in:
parent
81177926ff
commit
0397f69853
4 changed files with 6 additions and 6 deletions
6
Makefile
6
Makefile
|
@ -29,15 +29,15 @@ get:
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
make build
|
make build
|
||||||
GOPROXY_DEBUG=1 sudo bin/go-proxy
|
sudo GOPROXY_DEBUG=1 bin/go-proxy
|
||||||
|
|
||||||
debug-trace:
|
debug-trace:
|
||||||
make build
|
make build
|
||||||
GOPROXY_DEBUG=1 GOPROXY_TRACE=1 sudo bin/go-proxy
|
sudo GOPROXY_DEBUG=1 GOPROXY_TRACE=1 bin/go-proxy
|
||||||
|
|
||||||
profile:
|
profile:
|
||||||
GODEBUG=gctrace=1 make build
|
GODEBUG=gctrace=1 make build
|
||||||
GOPROXY_DEBUG=1 sudo bin/go-proxy
|
sudo GOPROXY_DEBUG=1 bin/go-proxy
|
||||||
|
|
||||||
mtrace:
|
mtrace:
|
||||||
bin/go-proxy debug-ls-mtrace > mtrace.json
|
bin/go-proxy debug-ls-mtrace > mtrace.json
|
||||||
|
|
|
@ -19,6 +19,8 @@ func highlight(subject string) string {
|
||||||
|
|
||||||
func PrependSubject(subject string, err error) error {
|
func PrependSubject(subject string, err error) error {
|
||||||
switch err := err.(type) {
|
switch err := err.(type) {
|
||||||
|
case nil:
|
||||||
|
return nil
|
||||||
case *withSubject:
|
case *withSubject:
|
||||||
return err.Prepend(subject)
|
return err.Prepend(subject)
|
||||||
case Error:
|
case Error:
|
||||||
|
|
|
@ -90,7 +90,7 @@ func (disp *Dispatcher) dispatch(msg *LogMessage) {
|
||||||
if errs.HasError() {
|
if errs.HasError() {
|
||||||
E.LogError(errs.About(), errs.Error())
|
E.LogError(errs.About(), errs.Error())
|
||||||
} else {
|
} else {
|
||||||
logging.Debug().Msgf("dispatched notif: %s", msg.Message)
|
logging.Debug().Str("title", msg.Title).Str("message", msg.Message).Msgf("dispatched notif")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,8 +62,6 @@ func (client *GotifyClient) Send(ctx context.Context, logMsg *LogMessage) error
|
||||||
priority = 5
|
priority = 5
|
||||||
case zerolog.FatalLevel, zerolog.PanicLevel:
|
case zerolog.FatalLevel, zerolog.PanicLevel:
|
||||||
priority = 8
|
priority = 8
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := &GotifyMessage{
|
msg := &GotifyMessage{
|
||||||
|
|
Loading…
Add table
Reference in a new issue