UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: localedefChapter 2
Unix Commands
Next: Reference: login
 

logger

logger [options] [messages]

Solaris only. Log messages to the system log. Command-line messages are logged if provided. Otherwise, messages are read and logged, line-by-line, from the file provided via -f. If no such file is given, logger reads messages from standard input.

Options

-f file

Read and log messages from file.

-i

Log the process ID of the logger process with each message.

-p priority

Log each message with the given priority. Priorities have the form facility.level. The default is user.notice. See syslog(3) for more information.

-t tag

Add tag to each message line.

Example

Warn about upcoming trouble:

logger -p user.emerg 'Incoming Klingon battleship!'


Previous: Reference: localedefUNIX in a Nutshell: System V EditionNext: Reference: login
Reference: localedefBook IndexReference: login

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System