mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-02 10:26:18 +00:00
Use prefixed-formatter for better logging
This commit is contained in:
@ -5,7 +5,7 @@ import (
|
||||
"github.com/42wim/matterbridge/bridge"
|
||||
"github.com/42wim/matterbridge/bridge/config"
|
||||
"github.com/42wim/matterbridge/gateway/samechannel"
|
||||
log "github.com/sirupsen/logrus"
|
||||
//log "github.com/sirupsen/logrus"
|
||||
// "github.com/davecgh/go-spew/spew"
|
||||
"time"
|
||||
)
|
||||
@ -42,13 +42,13 @@ func NewRouter(cfg *config.Config) (*Router, error) {
|
||||
func (r *Router) Start() error {
|
||||
m := make(map[string]*bridge.Bridge)
|
||||
for _, gw := range r.Gateways {
|
||||
log.Infof("Parsing gateway %s", gw.Name)
|
||||
flog.Infof("Parsing gateway %s", gw.Name)
|
||||
for _, br := range gw.Bridges {
|
||||
m[br.Account] = br
|
||||
}
|
||||
}
|
||||
for _, br := range m {
|
||||
log.Infof("Starting bridge: %s ", br.Account)
|
||||
flog.Infof("Starting bridge: %s ", br.Account)
|
||||
err := br.Connect()
|
||||
if err != nil {
|
||||
return fmt.Errorf("Bridge %s failed to start: %v", br.Account, err)
|
||||
|
Reference in New Issue
Block a user