syslog facilites and postgres ?

Поиск
Список
Период
Сортировка
От Day, David
Тема syslog facilites and postgres ?
Дата
Msg-id 401084E5E73F4241A44F3C9E6FD794280108D22E70@exch-01
обсуждение исходный текст
Ответы Re: syslog facilites and postgres ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

 


Hi,

 

Should I be able to run two syslog facilities simultaneously ( postgres local0, and a  trigger function to  local3 ) successfully ?

 

I have postgresql 9.3.1exit running on freebsd and sending errors  to “syslog_facility= local0”.

That works fine.

 

I have created an insert  trigger on one of my datatables using plperlu that opens syslog to facility local3 which directs

portions of that newly inserted record to local3. ( see below).  This works with the the following issue.

 

I find occasional notifications in my local3 log file that should I believe be in the local0 log file.  E.g. I will see some of

my RAISE LOG output in the local3 output log file rather than in the local0 output log file.   I suspect this is happening

during the window in which local3 is open and closed in the trigger function.   I note that the errant notification I find in local3 is not also found

in local0.

 

 

Any suggestions on this concept ?

 

 

Thanks

 

 

Dave Day

  

 

CREATE OR REPLACE FUNCTION log.connection_history_post_insert()

  RETURNS trigger AS

$BODY$

  use Sys::Syslog;

  openlog('smdr', 'ndelay,pid', 'local3');

  my $tmp = $_TD->{new} {orig_addr} .'->' . $_TD->{new} {term_addr} . '~' . $_TD->{new} {answer_datetime}

  syslog ("info", "data %s ", $tmp);

  closelog();

  return;

$BODY$

  LANGUAGE plperlu VOLATILE

В списке pgsql-general по дате отправления:

Предыдущее
От: Purdon
Дата:
Сообщение: Re: Is pgFoundry Down? (2/18/2014)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: syslog facilites and postgres ?