![](https://seccdn.libravatar.org/avatar/1f3a4ce704e550b5a9e4dc9529656f00.jpg?s=120&d=mm&r=g)
On 2023-03-09 16:43:40 Carlos E. R. wrote:
Why so many debug messages are going to the /var/log/warn log file?
For example:
<1.3> 2023-03-09T21:28:27.225193+01:00 Telcontar xsane - - - io/hpmud/model.c 532: no hp_HP_Color_LaserJet_CP1515n attributes found in /usr/share/hplip/data/models/models.dat <1.3> 2023-03-09T21:28:27.228248+01:00 Telcontar xsane - - - io/hpmud/model.c 543: no hp_HP_Color_LaserJet_CP1515n attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat
Well, it is a printer only, but xsane is looking to see if it has a scanner and not finding it. Why is that so huge a problem that I have to be warned about it? I don't care. The programmer might want to see it, but users have no need to see it.
Yet it has priority 3. It should be a debug message. For the programmer.
#define KERN_EMERG "<0>" /* system is unusable */ #define KERN_ALERT "<1>" /* action must be taken immediately */ #define KERN_CRIT "<2>" /* critical conditions */ #define KERN_ERR "<3>" /* error conditions */ #define KERN_WARNING "<4>" /* warning conditions */ #define KERN_NOTICE "<5>" /* normal but significant condition */ #define KERN_INFO "<6>" /* informational */ #define KERN_DEBUG "<7>" /* debug-level messages */
There are many more.
<1.4> 2023-03-09T23:11:37.426440+01:00 Telcontar tracker-extract 24161 - - Locale 'LANG' is not set, defaulting to C locale <1.4> 2023-03-09T23:20:54.003175+01:00 Telcontar tracker-extract 24897 - - Locale 'LANG' is not set, defaulting to C locale <1.4> 2023-03-09T23:21:36.812011+01:00 Telcontar tracker-extract 24927 - - Locale 'LANG' is not set, defaulting to C locale <1.4> 2023-03-09T23:22:05.421592+01:00 Telcontar tracker-extract 24950 - - Locale 'LANG' is not set, defaulting to C locale <1.4> 2023-03-09T23:22:43.379085+01:00 Telcontar tracker-extract 24973 - - Locale 'LANG' is not set, defaulting to C locale <1.4> 2023-03-09T23:23:08.342804+01:00 Telcontar tracker-extract 24991 - - Locale 'LANG' is not set, defaulting to C locale <1.4> 2023-03-09T23:25:31.775909+01:00 Telcontar tracker-extract 25112 - - Locale 'LANG' is not set, defaulting to C locale <1.4> 2023-03-09T23:26:15.878323+01:00 Telcontar tracker-extract 25144 - - Locale 'LANG' is not set, defaulting to C locale
Why is that a warning, and spamming the WARNING log?
<1.4> 2023-03-09T21:45:20.910119+01:00 Telcontar krusader 17147 - - QCoreApplication::applicationDirPath: Please instantiate the QApplication object first <1.4> 2023-03-09T21:45:21.655721+01:00 Telcontar krusader 17147 - - 21:45:21.655-warning default unknown@0 # QWidget::insertAction: Attempt to insert null action <1.4> 2023-03-09T21:45:21.657776+01:00 Telcontar krusader 17147 - - 21:45:21.657-warning default unknown@0 # QWidget::insertAction: Attempt to insert null action <1.4> 2023-03-09T21:45:21.666504+01:00 Telcontar krusader 17147 - - 21:45:21.666-warning kf.i18n unknown@0 # Trying to convert empty KLocalizedString to QString. <1.4> 2023-03-09T21:53:41.223609+01:00 Telcontar tracker-extract 17950 - - Locale 'LANG' is not set, defaulting to C locale <1.4> 2023-03-09T22:20:14.013742+01:00 Telcontar krusader 6836 - - 22:20:14.012-warning kf.kio.widgets unknown@0 # Failed to check which JobView API is supported "The name org.kde.kuiserver was not provided by any .service files"
Ditto.
1.4> 2023-03-09T19:07:32.113665+01:00 Telcontar tumblerd 4988 - - Name org.freedesktop.thumbnails.Cache1 lost on the message dbus, exiting. <1.4> 2023-03-09T19:07:32.113782+01:00 Telcontar tumblerd 4988 - - Name org.freedesktop.thumbnails.Manager1 lost on the message dbus, exiting. <1.4> 2023-03-09T19:07:32.113857+01:00 Telcontar tumblerd 4988 - - Name org.freedesktop.thumbnails.Thumbnailer1 lost on the message dbus, exiting.
There are so many messages going as WARNINGS that the truly important ones are ignored.
Sometimes I write a rule on rsyslog to clear some, but there are so many!
if $syslogfacility == 1 and $syslogseverity == 4 and $programname == 'tracker-extract' \ and $msg contains "Locale 'LANG' is not set, defaulting to C locale" \ then -/var/log/pruned.warn & stop
Maybe I should filter out entire programs:
if $syslogfacility == 1 and $syslogseverity == 4 and ($programname == 'tracker-extract' or $programname == 'kglobalaccel5' or $programname == 'tumblerd' or $programname == 'krusader') \ then -/var/log/pruned.warn & stop
This is like shouting WOLF! every day. When the wolf comes, nobody listens.
I don't know about /var/log/warn, but a similar thing that bugs me is the noise that comes out of GUI programs that I start from the command line. Just about every one of them writes junk on the terminal, sometimes just because I'm scrolling a window(!) For the ones I use a lot I've written wrappers that consign stderr to /dev/null (which of course is dangerous because it also suppresses valid error messages. Leslie -- Platform: Linux Distribution: openSUSE Leap 15.4 (x86_64)