File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414.Sh DESCRIPTION
1515The
1616.Nm
17- utility writes messages to the system log.
17+ utility writes messages to the system log or an arbitrary executable .
1818.Pp
19- With
20- .Ar message
21- arguments
19+ If
2220.Nm
23- will always write messages to the system log.
21+ is executed as
22+ .Nm logger
23+ it will always use the system log and behave like the regular
24+ .Xr logger 1 .
25+ .Pp
2426Without
2527.Ar message
2628arguments
@@ -36,8 +38,10 @@ executable exists
3638.Nm
3739executes it with
3840.Ar tag ,
39- level
40- and priority as arguments,
41+ .Ar level
42+ and
43+ .Ar facility
44+ as arguments,
4145replacing the
4246.Nm
4347process.
@@ -117,7 +121,7 @@ environment variable.
117121.It Ar message
118122Write the
119123.Ar message
120- to the log.
124+ to the system log.
121125.El
122126.Sh FACILITIES
123127.Bl -tag -width 11n -compact
Original file line number Diff line number Diff line change 66#include <unistd.h>
77#include <limits.h>
88
9+ extern char * __progname ;
10+
911static char pwd [PATH_MAX ];
1012
1113typedef struct {
@@ -99,6 +101,9 @@ main(int argc, char *argv[])
99101 level = LOG_NOTICE ;
100102 }
101103 }
104+ } else if (strcmp (__progname , "logger" ) == 0 ) {
105+ /* behave just like logger(1) and only use syslog */
106+ Sflag ++ ;
102107 }
103108
104109 while ((c = getopt (argc , argv , "f:ip:Sst:" )) != -1 )
You can’t perform that action at this time.
0 commit comments