4
0
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:
Wim
2018-02-21 00:20:25 +01:00
parent 6ea368c383
commit d1227b5fc9
17 changed files with 71 additions and 42 deletions

View File

@ -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)