Re: Suppress error message to log files

2019-02-04 Thread Andy Smith
Hi,

On Mon, Feb 04, 2019 at 02:42:51PM -0600, sel...@midwest.net wrote:
> Play one game and 
> 
> This entry found in /var/log/{messages,syslog,user.log}:
> Jan 26 00:55:23 debian quadrapassel[5542]: 
> ../../../../../gdk/x11/gdkwindow-x11.c:5611 
> drawable is not a native X11 window

[…]

> How do I suppress the posting of this "error".

Assuming rsyslog, you can make rsyslog ignore it and then it will never
be logged. For example:

$ cat /etc/rsyslog.d/ignore-quadrapassel-gdkwindow-spam.conf
if $programname == 'quadrapassel' then {
if $msg contains "drawable is not a native X11 window" then stop
}

Restart rsyslog afterwards:

# systemctl restart rsyslog

But probably it would be better to report the bug in
quadrapassel if it hasn't already been reported.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Suppress error message to log files

2019-02-04 Thread selsyn



Play one game and 

This entry found in /var/log/{messages,syslog,user.log}:
Jan 26 00:55:23 debian quadrapassel[5542]: 
../../../../../gdk/x11/gdkwindow-x11.c:5611 
drawable is not a native X11 window

# Size of messages file
jim:/var/log$   ls -lh messages
-rw-r- 1 root adm 250K Jan 28 13:58 messages

# Lines of duplicate error
jim:/var/log$  grep quadrapassel messages | wc -l 
1977 

# Remove the offending lines
jim:/var/log$  sed -i '/quadrapassel/d' messages

# New size 
jim:/var/log$  ls -lh messages
-rw-r- 1 root adm 13K Jan 28 14:02 messages

That's  (250K-13K) * 3  filling the log files per game.

How do I suppress the posting of this "error".