diff --git a/clients/clients.go b/clients/clients.go index 0e5816c8..1be29ad2 100644 --- a/clients/clients.go +++ b/clients/clients.go @@ -55,6 +55,15 @@ func (c *Clients) Update(config api.ClientConfig) (api.ClientConfig, error) { return old.config, err } +type MautrixLogger struct{} + +func (d *MautrixLogger) Debugfln(message string, args ...interface{}) { + log.Debugf(message, args...) +} +func (d *MautrixLogger) Warnfln(message string, args ...interface{}) { + log.Warnf(message, args...) +} + // Start listening on client /sync streams func (c *Clients) Start() error { configs, err := c.db.LoadMatrixClientConfigs() @@ -335,6 +344,7 @@ func (c *Clients) initClient(botClient *BotClient) error { return err } + client.Logger = &MautrixLogger{} client.Client = c.httpClient client.DeviceID = config.DeviceID if client.DeviceID == "" {