[SunHELP] logger utility

Dale Ghent daleg at elemental.org
Wed Oct 15 17:34:32 CDT 2003


On Wed, 15 Oct 2003, Nguyen, David M wrote:

> I'd like to use logger utility to log errors from /myown/logfile.log to
> /var/adm/messages.  Has someone known a better way to do this or having
> a script to do this?

I guess you're looking for something like this:

---------------------------------------------
#!/bin/sh

## Log file to watch
watch_log=/myown/logfile.log

## Syslog facility.level to log to
syslog_prio=daemon.notice

/usr/bin/tail -f $watch_log | \
        /usr/bin/logger -p $syslog_prio
----------------------------------------------


/ek
http://elektronkind.org/
----------
An event e's being F realizes e's being G just in case (i) e is F,
(ii) e is G, (iii) for all e it is (physically) necessary that if e
is F then e is G, and (iv) e's being F explains e's being G.
		- Basis of Multirealizability



More information about the SunHELP mailing list