Steve Singer ssinger at ca.afilias.info
Tue Mar 1 07:17:22 PST 2016
On 03/01/2016 10:13 AM, Rob Brucks wrote:
> That did the trick!  Just required modification to rsyslog settings.
>
> Thanks Steve!
>
> Still would be better if slony daemon log always had timestamps, it kind of makes SYSLOG=1 useless.
>

But syslog adds the timestamps to the log entries (assuming your syslog 
is configured that way)

Otherwise you'd have the timestamp show up twice per log entry.

> --Rob
>
>
>
>
> On 2/29/16, 8:48 PM, "Steve Singer" <ssinger at ca.afilias.info> wrote:
>
>> On 02/29/2016 03:59 PM, Rob Brucks wrote:
>>> Thanks Steve.  Yes, without a config file I get timestamps.
>>>
>>> And I spent some time today trying to figure out which parameter is causing this behavior.  It seems to only be happening if "SYSLOG" is set to anything other than zero.
>>>
>>> We prefer a SYSLOG setting of 1 because we have a central syslog logging and reporting facility where the messages are sent.  But the DEBUG level messages are important to us too, and they only get sent to the slony log file, but they don't have timestamps (making them far less useful).
>>>
>>>
>>> Which brings up another problem, why don't DEBUG messages get sent to syslog too?  If they were in syslog then we could set SYSLOG=3 and be done with it.
>>>
>>> So, IMHO, two bugs:
>>>
>>> 1) No timestamp in the slon daemon logs when SYSLOG=1
>>> 2) Slon daemon DEBUG messages never get sent to SYSLOG with any setting.
>>>
>>
>>
>> Looking at the logging code in misc.c
>>
>> Yes it will only log timestamps if syslog is disabled, I would guess
>> that the thinking was that syslog itself would record the timestamp? Ie
>> if you want the timestamp in your log you have syslog record it.
>>
>> When I log to syslog, I get the following in /var/log/message
>>
>> Feb 29 16:15:08 ssinger-laptop slon[10930]: [1-1] CONFIG main: slon
>> version 2.3.0 starting up
>>
>> If the message also included the timestamp then the timestamp would show
>> up twice in /var/log/message
>>
>>
>> Also I am getting debug messages in my syslog debug log
>>
>> tail -f /var/log/debug
>>
>> Feb 29 21:44:49 ssinger-laptop slon[15449]: [43-1] DEBUG2 stack_init() -
>> initialize stack to size 6
>> Feb 29 21:44:49 ssinger-laptop slon[15449]: [46-1] DEBUG2 stack_init() -
>> initialize stack to size 6
>> Feb 29 21:44:50 ssinger-laptop slon[15449]: [50-1] DEBUG1 local_monitor
>> "host=localhost dbname=test2": backend pid = 15457
>> Feb 29 21:44:50 ssinger-laptop slon[15449]: [51-1] DEBUG2 monitorThread:
>> setup DB conn
>> Feb 29 21:44:50 ssinger-laptop slon[15449]: [54-1] DEBUG1 local_cleanup
>> "host=localhost dbname=test2": backend pid = 15459
>> Feb 29 21:44:50 ssinger-laptop slon[15449]: [55-1] DEBUG1 cleanupThread:
>> Cleanup interval is : 600s
>> Feb 29 21:44:50 ssinger-laptop slon[15449]: [57-1] DEBUG1 local_sync
>> "host=localhost dbname=test2": backend pid = 15458
>> Feb 29 21:44:52 ssinger-laptop slon[15449]: [58-1] DEBUG2 syncThread:
>> new sl_action_seq 1 - SYNC 5000000011
>> Feb 29 21:44:56 ssinger-laptop slon[15449]: [59-1] DEBUG2
>> localListenThread: Received event 1,5000000011 SYNC
>> Feb 29 21:45:02 ssinger-laptop slon[15449]: [60-1] DEBUG2 syncThread:
>> new sl_action_seq 1 - SYNC 5000000012
>>
>> My slon conf is
>>
>> log_level=4
>> syslog=1
>>
>>
>> Maybe you should check your syslog configuration?
>>
>>
>>>
>>> Thanks,
>>> Rob
>>>
>>>
>>> On 2/29/16, 12:11 PM, "Steve Singer" <ssinger at ca.afilias.info> wrote:
>>>
>>>> On 02/26/2016 04:30 PM, Rob Brucks wrote:
>>>>> I have Slony 2.2.4 installed on Centos 6.7 x86_64 from the PGDG 9.3 repo.
>>>>>
>>>>> No matter what settings I set in the slony.conf file, I cannot get the
>>>>> Slon daemon to include timestamps in the slon log output.
>>>>>
>>>>
>>>> What output do you get if you start slon without a config file.
>>>>
>>>> When I start slon  I get
>>>>
>>>> slon  test 'host=localhost port=5432 dbname=test2'
>>>> 2016-02-29 09:24:42 EST CONFIG main: slon version 2.3.0 starting up
>>>> 2016-02-29 09:24:42 EST INFO   slon: watchdog process started
>>>> 2016-02-29 09:24:42 EST CONFIG slon: watchdog ready - pid = 25047
>>>> 2016-02-29 09:24:42 EST CONFIG slon: worker process created - pid = 25048
>>>> 2016-02-29 09:24:42 EST CONFIG main: Integer option vac_frequency = 3
>>>> 2016-02-29 09:24:42 EST CONFIG main: Integer option log_level = 0
>>>> 2016-02-29 09:24:42 EST CONFIG main: Integer option sync_interval = 2000
>>>> 2016-02-29 09:24:42 EST CONFIG main: Integer option
>>>> sync_interval_timeout = 10000
>>>>
>>>>
>>>> the timestamps are printed.
>>>>
>>>>
>>>> What if you leave all of
>>>> log_timestamp, log_timestamp_format out of the config file.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> I've tried changing both "log_timestamp" and "log_timestamp_format"
>>>>> settings in various combinations ("true","yes","1", etc.; even "no" in
>>>>> the hopes it was mistakenly coded backwards) without any success.
>>>>>
>>>>> I know that the Slon daemon is using this config file because I have the
>>>>> DB connection set in it and if I change it then it fails to connect.
>>>>>
>>>>> The lack of timestamps makes it incredibly difficult to diagnose
>>>>> problems after they occur.
>>>>>
>>>>> I have tried enabling syslog logging, but the syslog logging doesn't
>>>>> include all the output that goes to the slon log.
>>>>>
>>>>> Any suggestions to get timestamps working would be greatly appreciated!
>>>>>
>>>>> Thanks,
>>>>> Rob
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Slony1-bugs mailing list
>>>>> Slony1-bugs at lists.slony.info
>>>>> http://lists.slony.info/mailman/listinfo/slony1-bugs
>>>>>
>>>>
>>



More information about the Slony1-bugs mailing list