Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change verbosity of MXLog #1550

Closed
yspreen opened this issue Aug 16, 2022 · 3 comments · Fixed by #1557
Closed

Change verbosity of MXLog #1550

yspreen opened this issue Aug 16, 2022 · 3 comments · Fixed by #1557

Comments

@yspreen
Copy link

yspreen commented Aug 16, 2022

I have

        var config = MXLogConfiguration()
        config.logLevel = .none
        MXLog.configure(config)

before calling any MatrixSDK methods. Still, I'm seeing tons of MXSyncResponseFileStore, MXHTTPClient and MXFileStore log outputs. How does one properly configure this?

@yspreen
Copy link
Author

yspreen commented Aug 22, 2022

@pixlwave I actually ended up solving it by calling log() first, then setting the level. I think the first call to log() always overrode the config. the PR you merged seems to indicate the reverse solution?

@pixlwave
Copy link
Contributor

Ohhh interesting. I came to that conclusion because in Element, there's a call to log before the configuration is set. So when you tried setting .none it would never remove the destinations.

@yspreen
Copy link
Author

yspreen commented Aug 22, 2022

well I actually chose error now. what I had to do to fix this bug where it was always verbose was to just add a printout before. so this is my appdelegate launch method now:

        MXLog.debug("Bonjour")
        let config = MXLogConfiguration()
        config.logLevel = .error
        MXLog.configure(config)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants