2 * UCW Library Utilities -- A Simple Logger for use in shell scripts
4 * (c) 2001 Martin Mares <mj@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
16 main(int argc, char **argv)
21 if (argc < 3 || argc > 4 || strlen(argv[2]) != 1)
22 die("Usage: logger [<logname>:]<progname> <level> [<text>]");
23 if (c = strchr(argv[1], ':'))
32 msg(argv[2][0], argv[3]);
34 while (fgets(buf, sizeof(buf), stdin))
36 c = strchr(buf, '\n');