Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

output to syslog

 [1/4] from: jblake:arsenaldigital at: 5-Jul-2007 10:25


Can Rebol output a syslog message? I have a script that will log into our ticketing system to look for specific items. If there are some, I'd like the script to generate a syslog message. The message will be sent into our monitoring system and e-mail. I have the rest working and just need to add the syslog message. John

 [2/4] from: gregg:pointillistic at: 5-Jul-2007 9:09


Hi John, JB> Can Rebol output a syslog message? I haven't tried it, but from the spec it just means writing 1024 bytes or less over UDP on port 514 so, yes, REBOL should be able to do that. If nobody else has an existing scheme for it, I would start by just doing it simply and directly with ports. -- Gregg

 [3/4] from: santilli::gabriele::gmail::com at: 6-Jul-2007 10:14


2007/7/5, Gregg Irwin <gregg-pointillistic.com>:
> JB> Can Rebol output a syslog message? > > I haven't tried it, but from the spec it just means writing 1024 bytes > or less over UDP on port 514 so, yes, REBOL should be able to do that.
Or, having library access: libc: if-error [load/library %libc.so] [if-error [load/library %libc.so.6] [ print "FATAL: Unable to load libc.so!" quit ]] openlog: make routine! [ ident [string!] option [integer!] facility [integer!] ] libc "openlog" syslog: make routine! [ priority [integer!] format [string!] str [string!] ] libc "syslog" ; done this way to avoid the GC destroying the string ident-string: "your ident string" LOG_DAEMON: 16 openlog ident-string 0 LOG_DAEMON ; use your own options and facility - see man page ; now you can call syslog HTH, Gabriele

 [4/4] from: jblake::arsenaldigital::com at: 6-Jul-2007 9:56


I just have the core, not the command version. Thanks John