Skip to content

Commit

Permalink
Add log in common
Browse files Browse the repository at this point in the history
  • Loading branch information
kwon528 committed Nov 28, 2023
1 parent 3cf61d8 commit 8d715a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions common/link/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func (l *Link) startReceiverChannel(errCh chan error) error {
}
}
case error:
l.l.Debugf("ReceiverChannel error : %+v", t)
errCh <- t
default:
errCh <- fmt.Errorf("illegal Receiver channel type")
Expand All @@ -167,6 +168,7 @@ func (l *Link) startSenderChannel(errCh chan error) error {
select {
case rc := <-rcc:
err := l.result(rc)
l.l.Debugf("SenderChannel error : %+v", err)
errCh <- err
}
}
Expand Down
3 changes: 1 addition & 2 deletions common/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func newLinkFactory(srcRaw, dstRaw json.RawMessage, relayCfg RelayConfig, modLev

func (r *Relay) Start() error {
linkErrCh := make(chan error)

for _, lf := range r.lfs {
if err := start(lf.link, lf.sender, linkErrCh); err != nil {
return err
Expand All @@ -96,7 +95,7 @@ func (r *Relay) Start() error {
select {
case err := <-linkErrCh:
if err != nil {
fmt.Printf("Relay error : %+v", err)
log.GlobalLogger().Debugln("Relay error :", err)
return err
}
}
Expand Down

0 comments on commit 8d715a3

Please sign in to comment.