From 007f2ab630ca8c0bc739a9d85d6ba4025af00b14 Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 13 Jan 2023 15:02:44 +0100 Subject: [PATCH] Actually pass log level to logger --- client.go | 8 ++++++-- logger.go | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index a7b4cbe..11195e9 100644 --- a/client.go +++ b/client.go @@ -98,7 +98,9 @@ func (c *Client) Encrypt() error { c.client.UserID.String(), c.client.DeviceID, []byte(c.config.PickleKey), - logger{}, + logger{ + Level: c.config.LogLevel, + }, ) err := sqlCryptoStore.CreateTables() @@ -106,7 +108,9 @@ func (c *Client) Encrypt() error { 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() if err != nil { diff --git a/logger.go b/logger.go index 153b7cb..fd3aae7 100644 --- a/logger.go +++ b/logger.go @@ -6,7 +6,7 @@ import ( ) type logger struct{ - level uint + Level uint } func (l logger) Error(message string, args ...interface{}) {