mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-21 18:22:00 -08:00
Add more debug
This commit is contained in:
parent
e622587db4
commit
e92b6de09f
@ -100,7 +100,7 @@ func (b *Bridge) JoinChannels() error {
|
|||||||
func (b *Bridge) joinChannels(channels map[string]config.ChannelInfo, exists map[string]bool) error {
|
func (b *Bridge) joinChannels(channels map[string]config.ChannelInfo, exists map[string]bool) error {
|
||||||
for ID, channel := range channels {
|
for ID, channel := range channels {
|
||||||
if !exists[ID] {
|
if !exists[ID] {
|
||||||
log.Infof("%s: joining %s (%s)", b.Account, channel.Name, ID)
|
log.Infof("%s: joining %s (ID: %s)", b.Account, channel.Name, ID)
|
||||||
err := b.JoinChannel(channel)
|
err := b.JoinChannel(channel)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -16,11 +16,8 @@ var (
|
|||||||
githash string
|
githash string
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
|
||||||
log.SetFormatter(&log.TextFormatter{FullTimestamp: true})
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
log.SetFormatter(&log.TextFormatter{FullTimestamp: true})
|
||||||
flagConfig := flag.String("conf", "matterbridge.toml", "config file")
|
flagConfig := flag.String("conf", "matterbridge.toml", "config file")
|
||||||
flagDebug := flag.Bool("debug", false, "enable debug")
|
flagDebug := flag.Bool("debug", false, "enable debug")
|
||||||
flagVersion := flag.Bool("version", false, "show version")
|
flagVersion := flag.Bool("version", false, "show version")
|
||||||
@ -35,6 +32,7 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if *flagDebug || os.Getenv("DEBUG") == "1" {
|
if *flagDebug || os.Getenv("DEBUG") == "1" {
|
||||||
|
log.SetFormatter(&log.TextFormatter{FullTimestamp: false})
|
||||||
log.Info("Enabling debug")
|
log.Info("Enabling debug")
|
||||||
log.SetLevel(log.DebugLevel)
|
log.SetLevel(log.DebugLevel)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user