[SunHELP] logger utility
Sheldon T. Hall
shel at cmhcsys.com
Wed Oct 15 13:29:32 CDT 2003
Nguyen, David M said ...
> 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 use this function in my shell scripts:
---
# A Logging function so we can look like the big boys.
log ()
{
logger -p user.err -t "`/bin/basename $0`" $@
}
---
And call it like this:
---
log "Level $LEVEL dump complete:"
---
or even:
---
log "-f $tempfile"
---
-Shel
More information about the SunHELP
mailing list