Comment 3 for bug 1685003

Revision history for this message
James Lu (jlu5) wrote : Re: [Bug 1685003] Re: Configuration of log levels for syslog

Actually, this looks like bug
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773752

In short, gdm3 (GNOME's display manager) seems to redirect console
output for all programs it starts to syslog. Variety isn't directly
writing to syslog in this case; it's GNOME's that's filling it with
console clutter...

As a workaround, you can run these commands to drop messages from
programs you start (from
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773752#29):
$ echo 'user.* stop' > /etc/rsyslog.d/drop-user-messages.conf
$ systemctl restart rsyslog.service

On 20/04/17 10:24 PM, Behrooz Nobakht wrote:
> My setup is on GNOME 3.24 and Ubuntu 17.04.
>
> I am able to see the following log lines in /var/log/syslog every 3 mins
> (which is my Variety preference set). Attached to this comment.
>
> What I was able to figure out from source:
>
> - `VarietyWindow.parse_options` defines a `verbose` parameter which is by default 1.
> - Variety `__init__` reads the `verbose` flag and passes to `lib/helpers.set_up_logging`
> - `Helpers.set_up_logging` uses `verbose` to set the logging level for the logger instance that obtained from `logging.getLogger()`. Note that only `addHandler` is used which seems to be why log messages also show up in syslog.
>
> Now, if `verbose` could be also supported at `variety.conf` as well such
> that:
>
> - verbose == 0 > ERROR
> - verbose == 1 > INFO
> - verbose == 2 > DEBUG
>
> Then it might be a lot clearer log for tracing and trouble shooting as well. Default
> is now 1 with INFO level.
>
> Thanks.
>
> ** Attachment added: "variety-syslog.log"
> https://bugs.launchpad.net/variety/+bug/1685003/+attachment/4865901/+files/variety-syslog.log
>