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

Debug enabled since last version? #758

Closed
tomsquest opened this issue Jan 5, 2019 · 4 comments
Closed

Debug enabled since last version? #758

tomsquest opened this issue Jan 5, 2019 · 4 comments
Labels
stale Stale issue, closing soon.

Comments

@tomsquest
Copy link
Contributor

Since version 0.16.1, it seems that Albert is logging in Debug mode (or more verbosely).

Launching from the command line gives a lot of debug statement:

12:35:24 [DEBG:default] ========== SESSION SETUP STARTED ==========
12:35:24 [DEBG:default] TIME:      1 µs SESSION SETUP [org.albert.extension.files]
12:35:24 [DEBG:default] TIME:      1 µs SESSION SETUP [org.albert.extension.calculator]
12:35:24 [DEBG:default] TIME:      1 µs SESSION SETUP [org.albert.extension.applications]
12:35:24 [DEBG:default] TIME:   1453 µs SESSION SETUP [org.albert.extension.mpris]
12:35:24 [DEBG:default] TIME:      1 µs SESSION SETUP [org.albert.extension.python]
12:35:24 [DEBG:default] TIME:      1 µs SESSION SETUP [org.albert.extension.system]
12:35:24 [DEBG:default] TIME:      1 µs SESSION SETUP [org.albert.extension.websearch]
12:35:24 [DEBG:default] TIME:      1 µs SESSION SETUP [org.albert.extension.snippets]
12:35:24 [DEBG:default] TIME:   2046 µs SESSION SETUP OVERALL
12:35:24 [DEBG:default] ========== QUERY: ""  ==========
12:35:24 [DEBG:default] TIME:    532 µs SESSION TEARDOWN OVERALL
12:35:24 [DEBG:default] TIME:      8 µs MATCHES [org.albert.extension.files]
12:35:24 [DEBG:default] TIME:      4 µs MATCHES [org.albert.extension.mpris]
12:35:24 [DEBG:default] TIME:    206 µs MATCHES [org.albert.extension.calculator]
12:35:24 [DEBG:default] TIME:     97 µs MATCHES [org.albert.extension.applications]
12:35:24 [DEBG:default] TIME:      3 µs MATCHES [org.albert.extension.system]
12:35:24 [DEBG:default] TIME:      3 µs MATCHES [org.albert.extension.snippets]
12:35:24 [DEBG:default] TIME:     32 µs MATCHES [org.albert.extension.websearch]
12:35:24 [DEBG:default] TIME:    382 µs MATCHES [org.albert.extension.python]
12:35:24 [DEBG:default] TIME:   2610 µs QUERY OVERALL
12:35:25 [WARN:default] file:///usr/share/albert/org.albert.frontend.qmlboxmodel/styles/BoxModel/MainComponent.qml:284: Error: Cannot assign std::nullptr_t to QString
12:35:25 [DEBG:default] ========== SESSION TEARDOWN STARTED ==========
12:35:25 [DEBG:default] TIME:      1 µs SESSION TEARDOWN [org.albert.extension.files]
12:35:25 [DEBG:default] TIME:      1 µs SESSION TEARDOWN [org.albert.extension.calculator]
12:35:25 [DEBG:default] TIME:      1 µs SESSION TEARDOWN [org.albert.extension.applications]
12:35:25 [DEBG:default] TIME:      1 µs SESSION TEARDOWN [org.albert.extension.mpris]
12:35:25 [DEBG:default] TIME:      1 µs SESSION TEARDOWN [org.albert.extension.python]
12:35:25 [DEBG:default] TIME:      1 µs SESSION TEARDOWN [org.albert.extension.system]
12:35:25 [DEBG:default] TIME:      1 µs SESSION TEARDOWN [org.albert.extension.websearch]
12:35:25 [DEBG:default] TIME:      0 µs SESSION TEARDOWN [org.albert.extension.snippets]
12:35:25 [DEBG:default] TIME:  23903 µs SESSION TEARDOWN OVERALL

Source

ubuntu ppa

Environment

$ albert --report
        Albert version: 0.16.1
            Build date: Dec 31 2018 19:22:07
            Qt version: 5.9.5
  QT_QPA_PLATFORMTHEME: gtk2
       Binary location: /usr/bin/albert
                   PWD: /home/tom
                 SHELL: /bin/zsh
                  LANG: en_US.UTF-8
      XDG_SESSION_TYPE: x11
   XDG_CURRENT_DESKTOP: XFCE
       DESKTOP_SESSION: xubuntu
   XDG_SESSION_DESKTOP: xubuntu
                    OS: Ubuntu 18.04.1 LTS
     OS (type/version): ubuntu/18.04
             Build ABI: x86_64-little_endian-lp64
  Arch (build/current): x86_64/x86_64
 Kernel (type/version): linux/4.15.0-43-generic

Steps to reproduce

  1. Update latest version
  2. killall albert
  3. albert &

Expected behaviour

Only levels above warning logged.

Actual behaviour

Debug level enabled.

@bradym
Copy link

bradym commented Jul 9, 2019

Apparently this is a feature, not a bug. From https://github.com/albertlauncher/albert/blob/dev/dist/albert.changes#L8:

* [albert] Drop debug options if favor of QLoggingCategory env vars

Looking at the Qt docs I learned that these can be disabled using an environment variable. I've put the following in my $HOME/.profile to quiet the logs:

export QT_LOGGING_RULES="*.debug=false;*.info=false"

I assume this will impact all Qt applications, so you may not want to do this if you need the logs for other Qt applications. From my reading of the Qt doc above it's possible to set a category when logging and then it would be possible to quiet that specific category, but reading the code for albert I don't see any logging categories being set. It's possible I could have missed it, I'm not at all familiar with this codebase.

@tomsquest
Copy link
Contributor Author

That would explain the behavior. Thanks @bradym

Maybe a more specific solution would be to modify the systemd file (set the env-var in it). I will try that.

@stale
Copy link

stale bot commented Nov 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale issue, closing soon. label Nov 5, 2020
@ManuelSchneid3r
Copy link
Member

ubuntu ppa

really? I dont give support for third party packages. please check if the OBS package suffer the same issue.

@bradym ty for investigation and answering

Well I see that de default should be INFO instead of debug, but well unless this is not a problem with official packages I'll close this one.

Regards

Note: I wrote this comment as fast as I can to master the current pile of work. If I missed the point or you have other objections please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issue, closing soon.
Development

No branches or pull requests

3 participants