| T.R | Title | User | Personal Name
 | Date | Lines | 
|---|
| 493.1 |  | DECWET::RWALKER | Roger Walker - Media Changers | Fri Mar 14 1997 14:41 | 5 | 
|  | 	NetWorker uses the syslogd daemon to send messages to the
	log files.  That's why other daemon messages can end up
	in the same file.  The only way I know to get messages there
	is via the syslog(3) call.  I don't know if this can be
	done from the shell without a program.
 | 
| 493.2 | One way... | DECWET::FARLEE | Insufficient Virtual um...er.... | Fri Mar 14 1997 16:25 | 12 | 
|  | If you're not shy about using undocumented utilities, and if
your script runs with root permissions, you can use the
nsrlog command to insert entries in messages.log.
a'la:
nsrlog << EOF
Ok
I'm done now with my backup job.
EOF
You can see nsrlog being used in the notifications that NetWorker uses.
 | 
| 493.3 |  | SANITY::LEMONS | And we thank you for your support. | Fri Mar 14 1997 19:46 | 5 | 
|  |     Yippee!  Just what the doctor ordered!  Thanks, also, for including a
    code sample.  I'll use that in my script.
    
    Thanks again!
    tl
 | 
| 493.4 |  | SANITY::LEMONS | And we thank you for your support. | Sun Mar 16 1997 20:06 | 5 | 
|  |     Er, where _is_ nsrlog?  I did a quick look around, and didn't find it
    on my system.
    
    Thanks!
    tl
 | 
| 493.5 |  | DECWET::FARLEE | Insufficient Virtual um...er.... | Mon Mar 17 1997 09:44 | 11 | 
|  | Err... Sorry.
It's in the development tree that I am working on...
In the 4.2B release, you'll see the same functionality being 
accomplished by /usr/bin/logger -p daemon.notice
Check out the notification resource for "log default"
and the man page for logger.
Kevin
 | 
| 493.6 |  | SANITY::LEMONS | And we thank you for your support. | Mon Mar 17 1997 13:36 | 12 | 
|  |     Hi Kevin
    
    Neat!  Thanks for the pointer.  Here's an oddity:  the DU V4.0A logger
    man page mentions:
    
    	-p priority[.facility]
    
    and shows a priority of notice and a facility of daemon; this, to me,
    should yield '-p notice:daemon', not '-p daemon.notice'.  Any opinion?
    
    Thanks again!
    tl
 | 
| 493.7 | perl | LEXSS1::GINGER | Ron Ginger | Mon Mar 24 1997 08:44 | 2 | 
|  |     perl scripts have no trouble writing to the syslogd. just open it and
    write away.
 | 
| 493.8 |  | SANITY::LEMONS | And we thank you for your support. | Wed May 21 1997 14:24 | 17 | 
|  |     Hi
    
    What 'logger' command should I use to write informational messages
    (created during execution of a script that does cloning) to the
    NetWorker log file(s)?
    
    Should I write to messages or daemon.log?
    
    I'm guessing I need something like:
    
    /usr/bin/logger -f /usr/logs/messages -p daemon.notice Beginning
    cloning for ${client_line}
    
    Thoughts?
    
    Thanks
    tl
 | 
| 493.9 |  | DECWET::KAO | Yun Kao - NSR Engineer | Wed May 21 1997 15:18 | 3 | 
|  | It looks good to me.
I would write to /nsr/logs/messages since all the daemon.notice goes there.
 |