PrepAway - Latest Free Exam Questions & Answers

What command can be used to generate log entries of any facility and priority?

What command can be used to generate log entries of any facility and priority?

(supply just the command name without a path)

PrepAway - Latest Free Exam Questions & Answers

Answer: logger

Explanation/Reference:
From the man pages:
Logger makes entries in the system log. It provides a shell command interface to the syslog(3) system log module.

CAUTION: In most cases anyone can log to any facility, so we rely on convention for the correct facility to be chosen. However, generally only the  kernel can log to the "kern" facility. This is because the implementation of openlog() and syslog() in glibc does not allow  logging to the "kern" facility. Klogd circumvents  this restriction when logging to syslogd by reimplementing those functions itself.


Leave a Reply