Compare commits

...

2 Commits

Author SHA1 Message Date
Kyle Isom 4455b3467c updating logging 2023-06-09 16:53:25 -07:00
Kyle Isom 219d8e8c81 add more logging 2023-06-09 16:46:46 -07:00
2 changed files with 3 additions and 1 deletions

View File

@ -52,6 +52,7 @@ func (a *Account) Receive() {
panic("channel closed") panic("channel closed")
} }
log.Infoln("pushing message")
a.Push(m) a.Push(m)
} }
} }

View File

@ -35,6 +35,7 @@ func (svc *Service) QueueMessage(ctx context.Context, msg *pb.Message) (*pb.Resp
if stream == "" { if stream == "" {
acct = svc.Default acct = svc.Default
} else if acct, ok = svc.Accounts[stream]; !ok { } else if acct, ok = svc.Accounts[stream]; !ok {
log.Errf("invalid stream name '%s' in message", stream)
return &pb.Response{ return &pb.Response{
Timestamp: time.Now().Unix(), Timestamp: time.Now().Unix(),
Id: uuid.NewString(), Id: uuid.NewString(),
@ -45,7 +46,7 @@ func (svc *Service) QueueMessage(ctx context.Context, msg *pb.Message) (*pb.Resp
qmsg := core.NewMessage(msg) qmsg := core.NewMessage(msg)
if qmsg == nil { if qmsg == nil {
log.Err("server: invalid message received, dropping") log.Errln("server: invalid message received, dropping")
return &pb.Response{ return &pb.Response{
Timestamp: time.Now().Unix(), Timestamp: time.Now().Unix(),
Id: uuid.NewString(), Id: uuid.NewString(),