Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

logger(1) [bsd man page]

LOGGER(1)						      General Commands Manual							 LOGGER(1)

NAME
logger - make entries in the system log SYNOPSIS
logger [ -t tag ] [ -p pri ] [ -i ] [ -f file ] [ message ... ] ARGUMENTS
-t tag Mark every line in the log with the specified tag. -p pri Enter the message with the specified priority. The priority may be specified numerically or as a ``facility.level'' pair. For example, ``-p local3.info'' logs the message(s) as informational level in the local3 facility. The default is ``user.notice.'' -i Log the process id of the logger process with each line. -f file Log the specified file. message The message to log; if not specified, the -f file or standard input is logged. DESCRIPTION
Logger provides a program interface to the syslog(3) system log module. A message can be given on the command line, which is logged immediately, or a file is read and each line is logged. EXAMPLES
logger System rebooted logger -p local0.notice -t HOSTIDM -f /dev/idmc SEE ALSO
syslog(3), syslogd(8) 4.3 Berkeley Distribution September 17, 1985 LOGGER(1)

Check Out this Related Man Page

LOGGER(1)						    BSD General Commands Manual 						 LOGGER(1)

NAME
logger -- make entries in the system log SYNOPSIS
logger [-46Ais] [-f file] [-h host] [-P port] [-p pri] [-t tag] [message ...] DESCRIPTION
The logger utility provides a shell command interface to the syslog(3) system log module. The following options are available: -4 Force logger to use IPv4 addresses only. -6 Force logger to use IPv6 addresses only. -A By default, logger tries to send the message to only one address, even if the host has more than one A or AAAA record. If this option is specified, logger tries to send the message to all addresses. -i Log the process id of the logger process with each line. -s Log the message to standard error, as well as the system log. -f file Read the contents of the specified file into syslog. -h host Send the message to the remote system host instead of logging it locally. -P port Send the message to the specified port number on a remote system, which can be specified as a service name or as a decimal number. The default is ``syslog''. If an unknown service name is used, logger prints a warning and falls back to port 514. -p pri Enter the message with the specified priority. The priority may be specified numerically or as a ``facility.level'' pair. For exam- ple, ``-p local3.info'' logs the message(s) as informational level in the local3 facility. The default is ``user.notice.'' -t tag Mark every line in the log with the specified tag rather than the default of current login name. message Write the message to log; if not specified, and the -f flag is not provided, standard input is logged. EXIT STATUS
The logger utility exits 0 on success, and >0 if an error occurs. EXAMPLES
logger System rebooted logger -p local0.notice -t HOSTIDM -f /dev/idmc SEE ALSO
syslog(3), syslogd(8) STANDARDS
The logger command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. BSD
March 4, 2014 BSD
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

know who logged and logged out with their timings

being ordinary user (not having any administrative rights) can avail myself a facility to know who logged and logged out with their timings get popped onto my terminal as if it get echo 'ed... (3 Replies)
Discussion started by: vkandati
3 Replies

2. AIX

syslog question

AIX 4.3.3 I'm attempting to script a log viewer to pull out significant events from a system log and I am having some trouble with priority codes. A section in the man page on syslogd states about the log output format: Each message is one line. A message can contain a priority code, marked... (5 Replies)
Discussion started by: jalburger
5 Replies

3. Shell Programming and Scripting

Parsing a Log file

Hi All, I'm deffently not a Unix specialist so be Gentel. I need to parse a Log file that looks like that: 2006-06-12 01:00:00,463 ERROR {cleanLoggersFiles} General Error comverse.compas.shared.exceptions.SystemParametersException: Error in reading parameter FileLocation at... (4 Replies)
Discussion started by: tbirenzweig
4 Replies

4. Shell Programming and Scripting

Regular expression query in AWK

I have a varable(var1) in a AWK script that contain data in the following format - I need to extract timestamp,priority and log message.I can extract these by using split function but i don't want to use it, since i want to extract it in one go. I have some difficulties in doing it using... (3 Replies)
Discussion started by: omprasad
3 Replies

5. Programming

Key logger

I want to program my own key logger to register every key pushed on my system... could i record clicks? Well, my question in fact is not one at all... because i dont have a starting point. I'll appreciate your bases :(. ty. (5 Replies)
Discussion started by: Jariya
5 Replies

6. Shell Programming and Scripting

bash - delay expansion of variable

Hello - I have a bash script which does some logging, and I'd like to include the line number of the echo statement that pipes into $LOGGER: MYPID=$$ MYNAME=`basename $0` LOGGER="/usr/bin/logger -t $MYNAME($LINENO) -p daemon.error" ... echo 'this is an entry into the log file' | $LOGGER ... (3 Replies)
Discussion started by: scandora
3 Replies

7. UNIX for Dummies Questions & Answers

Log information

hello all, so i'm working on a script, and part of it is to display the log info of the current logged on users, 1- full name 2- last log-in time 3- source ip address i used who command to find the user ID then grep the full name and the last log in time. but i can't find a command... (6 Replies)
Discussion started by: ibzee33
6 Replies

8. Cybersecurity

Unix keystroke logger

Hi all, Does anyone know if there is a tool in the market that could do the following when System Admin log to the server as root and perform activities according to his change request: - trap or log his keystroke for the entire duration - provide a report on the changes SA has made to the... (3 Replies)
Discussion started by: mohzub
3 Replies

9. Shell Programming and Scripting

Script to remove line of text

Hello, I have a line that needs to be removed using sed -i to perform the replace in place. The issue that I have is the files on each server may contain extra rows after the last logger definition. So I can't count accurately from the last row. So from the example the line that contains... (8 Replies)
Discussion started by: jaysunn
8 Replies

10. Shell Programming and Scripting

Unix Log out time

Hi, Is there a way to find out the logout date for a user who has been logged in to the system for more than 1 day. For example, the below user as indicated by the "last" command had logged into the system on Mar 8 and he has been online for 2 days and 6:53 hour:min. So basically, he logged out... (2 Replies)
Discussion started by: devtakh
2 Replies

11. Ubuntu

Date format in the files written by syslogd

Hi, Below is what i am seeing in /var/log/messages on ubuntu machine. 2013-01-14T18:29:39.319736+00:00 test01 ldap-mail: test1 Jan 14 18:29:39 test01 ldap-mail: test2 2013-01-14T18:29:39.320792+00:00 test01 ldap-mail: test3 Jan 14 18:29:39 test01 ldap-mail: test4But on other ubuntu... (29 Replies)
Discussion started by: prash358
29 Replies

12. UNIX for Dummies Questions & Answers

Problem with structure of authlog in regard to an external log Auditing system.

Hello everyone, I hope I'm posting my question in the right section as it is not too easy to find the ideal spot for this one, especially for a brandspankingnew user of this forum. As this might be something simple I chose the Dummy section. By all means, feel free to move the post if not at... (4 Replies)
Discussion started by: Sjleegketting
4 Replies

13. Shell Programming and Scripting

How to process only new line of tail -f command from live log file?

Hi, I want to read a live log file line by line and considering those line which are newly added to file Below code I am using, which read line but as soon as it read new line from log file its starts processing from very first line of file. tail -F /logs/COMMON-ERROR.log | while read... (11 Replies)
Discussion started by: ketanraut
11 Replies

14. UNIX for Advanced & Expert Users

Copy open active log

Hi, I try to copy the nohup.out to new file using cp command on solaris 10 However, the new file is very large size compare to nohup.out The file is in English format text. Any solution for copying active/open log file without problem with the size. ex: /dir > du -sh nohup.out 636K ... (7 Replies)
Discussion started by: xitrum
7 Replies

15. Shell Programming and Scripting

Multi line log files to single line format

I want to read the log file which was generate from other command . And the output was having multi line in log files for job name and server name. But i need to make all the logs on one line Source file 07/15/2018 17:02:00 TRANSLOG_1700 Server0005_SQL ... (2 Replies)
Discussion started by: ranjancom2000
2 Replies