How to send message to syslog agent in plsql

120 Views Asked by At

I want to send message to syslog in plsql.

I think it's possible via utl_tcp and ACL but have no idea how to do that.

For example, in unix, the command should be:

logger -p local1.info "hello word"

Who know how to do same with plsql code?

thank in advance

1

There are 1 best solutions below

2
Wernfried Domscheit On

I don't think you can send directly to native syslog protocol. However, with syslog-ng you can read (and forward) from various sources. I would try to use the network(), i.e. tcp source and then simply try UTL_TCP.WRITE_LINE() function.

Most likely it will work better with no-parse option. Then you can simply send just the message and all syslog related properties will be created automatically by syslog-ng.