1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00

sbin/devd/devd.cc

Promoting the SIGINFO handler's log message from LOG_INFO to
	LOG_NOTICE, and promoting the "Processing event ..." message from
	LOG_DEBUG to LOG_INFO.  Setting the logfile to LOG_NOTICE with this
	change will have the same result as setting it to LOG_INFO without
	this change.  Setting it to LOG_INFO with this change will include
	the useful "Processing event ..." messages that were previously at
	LOG_DEBUG, without including useless messages like "Pushing table".

	The intent of this change is that one can log "Processing event ..."
	without logging "Pushing table" and related messages that are sent
	for every event.  The number of lines actually logged is reduced by
	about 75% by making this change and setting syslog to LOG_INFO vs
	setting syslog to LOG_DEBUG.

etc/syslog.conf
	Changing the recommended loglevel to notice instead of info.

Sponsored by:	Spectra Logic Corp
MFC after:	4 weeks
This commit is contained in:
Alan Somers 2013-12-13 22:58:57 +00:00
parent 0603b75a7a
commit f0038a8e98
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=259362
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ cron.* /var/log/cron
# news.notice /var/log/news/news.notice
# Uncomment this if you wish to see messages produced by devd
# !devd
# *.>=info /var/log/devd.log
# *.>=notice /var/log/devd.log
!ppp
*.* /var/log/ppp.log
!*

View File

@ -772,7 +772,7 @@ process_event(char *buffer)
char *sp;
sp = buffer + 1;
devdlog(LOG_DEBUG, "Processing event '%s'\n", buffer);
devdlog(LOG_INFO, "Processing event '%s'\n", buffer);
type = *buffer++;
cfg.push_var_table();
// No match doesn't have a device, and the format is a little
@ -989,7 +989,7 @@ event_loop(void)
}
rv = select(max_fd, &fds, NULL, NULL, &tv);
if (got_siginfo) {
devdlog(LOG_INFO, "Events received so far=%u\n",
devdlog(LOG_NOTICE, "Events received so far=%u\n",
total_events);
got_siginfo = 0;
}