diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -10,15 +10,16 @@ import ( _"strings" _ "time" _ "fmt" - "log" "encoding/json" + log "github.com/sirupsen/logrus" + "gopkg.in/yaml.v2" + "git.deuxfleurs.fr/Deuxfleurs/easybridge/mxlib" "git.deuxfleurs.fr/Deuxfleurs/easybridge/appservice" "git.deuxfleurs.fr/Deuxfleurs/easybridge/connector" "git.deuxfleurs.fr/Deuxfleurs/easybridge/connector/irc" "git.deuxfleurs.fr/Deuxfleurs/easybridge/connector/xmpp" - "gopkg.in/yaml.v2" ) type ConfigAccount struct { @@ -153,6 +154,8 @@ func readRegistration(file string) mxlib.Registration { } func main() { + log.SetLevel(log.DebugLevel) + flag.Parse() config_file := readConfig() @@ -206,9 +209,9 @@ func connectAndJoin(conn connector.Connector, params ConfigAccount) { log.Printf("Connecting to %s", params.Protocol) err := conn.Configure(params.Config) if err != nil { - log.Printf("Could not connect to %s: %s\n", params.Protocol, err) + log.Printf("Could not connect to %s: %s", params.Protocol, err) } else { - log.Printf("Connected to %s, now joining %#v`n", params.Protocol, params.Rooms) + log.Printf("Connected to %s, now joining %#v", params.Protocol, params.Rooms) for _, room := range params.Rooms { err := conn.Join(connector.RoomID(room)) if err != nil { |