19b50d902SRodney W. Grimes.\" Copyright (c) 1983, 1990, 1993 29b50d902SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 39b50d902SRodney W. Grimes.\" 49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions 69b50d902SRodney W. Grimes.\" are met: 79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 89b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 109b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 119b50d902SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 139b50d902SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 149b50d902SRodney W. Grimes.\" without specific prior written permission. 159b50d902SRodney W. Grimes.\" 169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 199b50d902SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 269b50d902SRodney W. Grimes.\" SUCH DAMAGE. 279b50d902SRodney W. Grimes.\" 28*5aee3e14SEugene Grosbein.Dd July 3, 2023 299b50d902SRodney W. Grimes.Dt LOGGER 1 3062500372SRuslan Ermilov.Os 319b50d902SRodney W. Grimes.Sh NAME 329b50d902SRodney W. Grimes.Nm logger 339b50d902SRodney W. Grimes.Nd make entries in the system log 349b50d902SRodney W. Grimes.Sh SYNOPSIS 35df071556SPhilippe Charnier.Nm 36c4646e2dSRuslan Ermilov.Op Fl 46Ais 379b50d902SRodney W. Grimes.Op Fl f Ar file 3865547fb3SGleb Smirnoff.Op Fl H Ar hostname 39b0fe2da8SDavid Malone.Op Fl h Ar host 406b04b7f6SBruce M Simpson.Op Fl P Ar port 419b50d902SRodney W. Grimes.Op Fl p Ar pri 42a04667abSHiroki Sato.Op Fl S Ar addr Ns \&: Ns Ar port 439b50d902SRodney W. Grimes.Op Fl t Ar tag 449b50d902SRodney W. Grimes.Op Ar message ... 459b50d902SRodney W. Grimes.Sh DESCRIPTION 46e8937ba0SPhilippe CharnierThe 47e8937ba0SPhilippe Charnier.Nm 48e8937ba0SPhilippe Charnierutility provides a shell command interface to the 499b50d902SRodney W. Grimes.Xr syslog 3 509b50d902SRodney W. Grimessystem log module. 519b50d902SRodney W. Grimes.Pp 5283edb87bSPhilippe CharnierThe following options are available: 5383edb87bSPhilippe Charnier.Bl -tag -width indent 540b5f90afSHajimu UMEMOTO.It Fl 4 558cd319f7SPhilippe CharnierForce 560b5f90afSHajimu UMEMOTO.Nm 570b5f90afSHajimu UMEMOTOto use IPv4 addresses only. 580b5f90afSHajimu UMEMOTO.It Fl 6 598cd319f7SPhilippe CharnierForce 600b5f90afSHajimu UMEMOTO.Nm 610b5f90afSHajimu UMEMOTOto use IPv6 addresses only. 620b5f90afSHajimu UMEMOTO.It Fl A 633e32fa38SChristian BruefferBy default, 643e32fa38SChristian Brueffer.Nm 653e32fa38SChristian Brueffertries to send the message to only one address, 660b5f90afSHajimu UMEMOTOeven if the host has more than one A or AAAA record. 670b5f90afSHajimu UMEMOTOIf this option is specified, 680b5f90afSHajimu UMEMOTO.Nm 690b5f90afSHajimu UMEMOTOtries to send the message to all addresses. 709b50d902SRodney W. Grimes.It Fl i 719b50d902SRodney W. GrimesLog the process id of the logger process 729b50d902SRodney W. Grimeswith each line. 734bbc8ee2SFernando ApesteguíaThis flag is ignored and the process id is always logged. 74*5aee3e14SEugene GrosbeinSee also 75*5aee3e14SEugene Grosbein.Fl t . 769b50d902SRodney W. Grimes.It Fl s 779b50d902SRodney W. GrimesLog the message to standard error, as well as the system log. 789b50d902SRodney W. Grimes.It Fl f Ar file 793e5184c6SBrad DavisRead the contents of the specified file into syslog. 808c2eccbfSWarren BlockThis option is ignored when a message is also specified. 8165547fb3SGleb Smirnoff.It Fl H Ar hostname 8265547fb3SGleb SmirnoffSet the hostname in the header of the message to specified value. 8365547fb3SGleb SmirnoffIf not specified, host part of 8465547fb3SGleb Smirnoff.Xr gethostname 3 8565547fb3SGleb Smirnoffwill be used. 86b0fe2da8SDavid Malone.It Fl h Ar host 87b0fe2da8SDavid MaloneSend the message to the remote system 88b0fe2da8SDavid Malone.Ar host 89b0fe2da8SDavid Maloneinstead of logging it locally. 90a04667abSHiroki SatoNote that 91a04667abSHiroki Sato.Nm 92a04667abSHiroki Satocurrently supports 93a04667abSHiroki Sato.Li AF_INET 94a04667abSHiroki Sato.Pq IPv4 , 95a04667abSHiroki Sato.Li AF_INET6 96a04667abSHiroki Sato.Pq IPv6 , 97a04667abSHiroki Satoand 98a04667abSHiroki Sato.Li AF_LOCAL 99a04667abSHiroki Sato.Pq Unix-domain socket 100a04667abSHiroki Satoaddress families. 101a04667abSHiroki SatoThe following address formats are valid in 102a04667abSHiroki Sato.Ar host : 103a04667abSHiroki Sato.Pp 104a04667abSHiroki Sato.Bl -tag -width "AF_LOCAL" -compact 105a04667abSHiroki Sato.It Li AF_INET 106a04667abSHiroki Sato192.168.2.1 107a04667abSHiroki Sato.It Li AF_INET6 108a04667abSHiroki Sato2001:db8::1 109a04667abSHiroki Sato.It Li AF_LOCAL 110a04667abSHiroki Sato.Pa /var/run/log 111a04667abSHiroki Sato.El 1126b04b7f6SBruce M Simpson.It Fl P Ar port 1136b04b7f6SBruce M SimpsonSend the message to the specified 1146b04b7f6SBruce M Simpson.Ar port 1156b04b7f6SBruce M Simpsonnumber on a remote system, 1166b04b7f6SBruce M Simpsonwhich can be specified as a service name 1176b04b7f6SBruce M Simpsonor as a decimal number. 118cb29445aSRuslan ErmilovThe default is 119cb29445aSRuslan Ermilov.Dq Li syslog . 1206b04b7f6SBruce M SimpsonIf an unknown service name is used, 1216b04b7f6SBruce M Simpson.Nm 1226b04b7f6SBruce M Simpsonprints a warning and falls back to port 514. 1239b50d902SRodney W. Grimes.It Fl p Ar pri 1249b50d902SRodney W. GrimesEnter the message with the specified priority. 12539bb7275SHiroki SatoThe priority may be specified numerically or as a 12639bb7275SHiroki Sato.Li facility.level 1279b50d902SRodney W. Grimespair. 12839bb7275SHiroki SatoFor example, 12939bb7275SHiroki Sato.Dq Fl p Li local3.info 13039bb7275SHiroki Satologs the message(s) as 1319b50d902SRodney W. Grimes.Ar info Ns rmational 1329b50d902SRodney W. Grimeslevel in the 1339b50d902SRodney W. Grimes.Ar local3 1349b50d902SRodney W. Grimesfacility. 13539bb7275SHiroki SatoThe default is 13639bb7275SHiroki Sato.Dq Li user.notice . 137a04667abSHiroki Sato.It Fl S Ar addr Ns \&: Ns Ar port 138a04667abSHiroki SatoSpecify source address and/or source port when using 139a04667abSHiroki Sato.Fl h 140a04667abSHiroki Satooption. 141a04667abSHiroki SatoThe same address will be used for all of the remote addresses 142a04667abSHiroki Satowhen 143a04667abSHiroki Sato.Fl A 144a04667abSHiroki Satoflag is enabled. 145a04667abSHiroki SatoNote that a numeric IPv6 address in 146a04667abSHiroki Sato.Ar addr 147a04667abSHiroki Satomust be enclosed with 14839bb7275SHiroki Sato.Dq \&[ 149a04667abSHiroki Satoand 15039bb7275SHiroki Sato.Dq \&] . 1519b50d902SRodney W. Grimes.It Fl t Ar tag 1529b50d902SRodney W. GrimesMark every line in the log with the specified 15381280940SEdwin Groothuis.Ar tag 15481280940SEdwin Groothuisrather than the default of current login name. 155*5aee3e14SEugene GrosbeinUse 156*5aee3e14SEugene Grosbein.Fl t Ar tag[N] 157*5aee3e14SEugene Grosbeinto insert specific decimal process id instead of id of 158*5aee3e14SEugene Grosbein.Nm . 1599b50d902SRodney W. Grimes.It Ar message 1609b50d902SRodney W. GrimesWrite the message to log; if not specified, and the 1619b50d902SRodney W. Grimes.Fl f 1629b50d902SRodney W. Grimesflag is not 1639b50d902SRodney W. Grimesprovided, standard input is logged. 1649b50d902SRodney W. Grimes.El 165a866e170SRuslan Ermilov.Sh EXIT STATUS 166d628d776SRuslan Ermilov.Ex -std 1679b50d902SRodney W. Grimes.Sh EXAMPLES 1689b50d902SRodney W. Grimes.Bd -literal -offset indent -compact 1699b50d902SRodney W. Grimeslogger System rebooted 1709b50d902SRodney W. Grimes 1719b50d902SRodney W. Grimeslogger \-p local0.notice \-t HOSTIDM \-f /dev/idmc 1729b50d902SRodney W. Grimes.Ed 1739b50d902SRodney W. Grimes.Sh SEE ALSO 1749b50d902SRodney W. Grimes.Xr syslog 3 , 1759b50d902SRodney W. Grimes.Xr syslogd 8 1769b50d902SRodney W. Grimes.Sh STANDARDS 1779b50d902SRodney W. GrimesThe 178df071556SPhilippe Charnier.Nm 1799b50d902SRodney W. Grimescommand is expected to be 1809b50d902SRodney W. Grimes.St -p1003.2 1819b50d902SRodney W. Grimescompatible. 182