Syslog Logging – How to Disable Logging to Syslog

airmon-ngbashlogssyslog

I am experimenting with aircrack-ng and I managed to fill up / with the syslog file complaining about what I'm doing to the poor wifi card. How can I disable logging to syslog for the duration of my Bash session?. Of course I would like other, unrelated, processes to continue their logging as necessary.

The /var/log/syslog file looks like this, repeating:

Oct 24 03:39:40 loathe NetworkManager[673]: <error> [1445647180.233086] [platform/nm-linux-platform.c:2782] do_chan     ge_link(): platform-linux: do-change-link: failure changing link 4: Unspecific failure (1)
Oct 24 03:39:40 loathe wpa_supplicant[762]: Could not set interface mon0 flags (UP): Name not unique on network
Oct 24 03:39:40 loathe wpa_supplicant[762]: nl80211: Could not set interface 'mon0' UP
Oct 24 03:39:40 loathe wpa_supplicant[762]: nl80211: deinit ifname=mon0 disabled_11b_rates=0
Oct 24 03:39:40 loathe wpa_supplicant[762]: Could not set interface mon0 flags (UP): Name not unique on network
Oct 24 03:39:40 loathe wpa_supplicant[762]: WEXT: Could not set interface 'mon0' UP
Oct 24 03:39:40 loathe wpa_supplicant[762]: mon0: Failed to initialize driver interface

This is on Kubuntu 15.10.

Best Answer

syslog is system wide, so you can't disable syslog on a per session basis.

However, you can

  • copy /etc/rsyslog.conf to /tmp/rsyslog.conf
  • edit /tmp/rsyslog.conf to remove unwanted logging
  • kill rsyslogd (/etc/init.d/rsyslogd stop)
  • run rsyslogd -d -f /tmp/rsyslog.conf for the time of your "session"

at the end of the session

  • kill rsyslogd (find process with ps)
  • run rsyslog (/etc/init.d/rsyslogd start)
Related Question