static char SccsId
[] = "@(#)logger.c 1.2 7/22/82";
** LOGGER -- read and log utility
** This routine reads from an input and arranges to write the
** result on the system log, along with a useful tag.
/* this can be used to give null parameters */
if (argc
> 1 && argv
[1][0] != '-')
if (argc
> 1 && argv
[1][0] != '-')
case 'i': /* log process id also */
case 'f': /* file to log */
if (argc
> 1 && argv
[1][0] != '-')
if (freopen(*++argv
, "r", stdin
) == NULL
)
fprintf(stderr
, "logger: unknown flag -%s\n", p
);
/* log input line if appropriate */
while (fgets(buf
, sizeof buf
, stdin
) != NULL
)