Actually pass log level to logger

This commit is contained in:
Luca 2023-01-13 15:02:44 +01:00
parent a28313b077
commit 007f2ab630
2 changed files with 7 additions and 3 deletions

View File

@ -98,7 +98,9 @@ func (c *Client) Encrypt() error {
c.client.UserID.String(), c.client.UserID.String(),
c.client.DeviceID, c.client.DeviceID,
[]byte(c.config.PickleKey), []byte(c.config.PickleKey),
logger{}, logger{
Level: c.config.LogLevel,
},
) )
err := sqlCryptoStore.CreateTables() err := sqlCryptoStore.CreateTables()
@ -106,7 +108,9 @@ func (c *Client) Encrypt() error {
return err return err
} }
c.olmMachine = crypto.NewOlmMachine(c.client, &logger{}, sqlCryptoStore, c.store) c.olmMachine = crypto.NewOlmMachine(c.client, &logger{
Level: c.config.LogLevel,
}, sqlCryptoStore, c.store)
err = c.olmMachine.Load() err = c.olmMachine.Load()
if err != nil { if err != nil {

View File

@ -6,7 +6,7 @@ import (
) )
type logger struct{ type logger struct{
level uint Level uint
} }
func (l logger) Error(message string, args ...interface{}) { func (l logger) Error(message string, args ...interface{}) {