You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Bradley Scalio <Br...@noaa.gov> on 2011/09/13 14:28:14 UTC
Logging
Greetings,
Trying to turn off logging to /var/log/messages and send qpidd logging
to /var/log/qpidd.log
I tried the following in our qpidd.conf:
sed -i '$a log-to-file=/var/log/qpidd.log' qpidd.conf
sed -i '$a log-to-syslog=no' qpidd.conf
I get logging to /var/log/qpidd.log but I still am receiving duplicates
to /var/log/messages.
I know there are ample log sink options and variations, and have tested
a few to no avail, including syslog-name=qpidd.log
Is there a basic setup to not log to syslog?
thanks
--
Bradley M Scalio, RHCE RHCSS
Principal Engineer w/Honors
AWIPS Mission Assurance
Mission Operations& Services
Raytheon Company
(o) +301-495-2277
(c) +301-830-0207
(f) +301-713-1950
Re: qpidd SIGHUP Re: Logging
Posted by Siddhesh Poyarekar <sp...@redhat.com>.
On Thu, Sep 15, 2011 at 10:54:16AM -0500, Alex Kulyavtsev wrote:
> On Sep 15, 2011, at 8:24 AM, Alan Conway wrote:
>
> >Not presently, qpidd ignores SIGHUP. Open a JIRA for this, with
> >details of what you want qpidd to do on SIGUP.
>
> Besides switching logs, can it be done qpidd will re-read qpidd.conf
> and acl files to avoid restart when configuration changed?
> Things like log levels in qpidd.conf, or group list definition in acl
You should be able to change log levels by using the 'call' method in
qpid-tool to call the setLogLevel function as follows:
call 25120 setLogLevel debug+
You'll get the first argument (25120) as the output of the 'list
broker' command on qpid-tool console:
qpid: list broker
Object Summary:
ID Created Destroyed Index
=========================================
25120 17:20:40 - amqp-broker
ACL refresh via qpid-tool is not working currently in 0.12
(not sure about trunk) but you should be able to do it using a tiny
bit of qmf code too.
--
Siddhesh
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: qpidd SIGHUP Re: Logging
Posted by Carl Trieloff <cc...@redhat.com>.
On 09/16/2011 09:41 AM, Alan Conway wrote:
>
> In general qpidd is not designed to re-set configuration on the fly.
> Resetting log levels would be straightforward. I'm not sure about ACL.
> Include it in the JIRA and we'll see what can be done.
ACL can be reset on the fly.
place a new ACL file down and call reload acl method from QMF, via a
client to qpid-tool. status return tells you if applied or ACL had
errors. if ACL has errors then old one stays in force.
Carl.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: qpidd SIGHUP Re: Logging
Posted by Alan Conway <ac...@redhat.com>.
On 09/15/2011 11:54 AM, Alex Kulyavtsev wrote:
> On Sep 15, 2011, at 8:24 AM, Alan Conway wrote:
>
>> Not presently, qpidd ignores SIGHUP. Open a JIRA for this, with details of
>> what you want qpidd to do on SIGUP.
>
> Besides switching logs, can it be done qpidd will re-read qpidd.conf and acl
> files to avoid restart when configuration changed?
> Things like log levels in qpidd.conf, or group list definition in acl file.
> Alex.
In general qpidd is not designed to re-set configuration on the fly. Resetting
log levels would be straightforward. I'm not sure about ACL. Include it in the
JIRA and we'll see what can be done.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
qpidd SIGHUP Re: Logging
Posted by Alex Kulyavtsev <ai...@fnal.gov>.
On Sep 15, 2011, at 8:24 AM, Alan Conway wrote:
> Not presently, qpidd ignores SIGHUP. Open a JIRA for this, with
> details of what you want qpidd to do on SIGUP.
Besides switching logs, can it be done qpidd will re-read qpidd.conf
and acl files to avoid restart when configuration changed?
Things like log levels in qpidd.conf, or group list definition in acl
file.
Alex.
Re: Logging
Posted by Alan Conway <ac...@redhat.com>.
On 09/13/2011 09:58 AM, Bradley Scalio wrote:
> Thanks for the great turnaround!
>
> One final question then on logging. With logrotate usually a postrotate sighup
> on the pidfile will cause the process to then write to the new logs, but this
> isn't working either for qpid when running in daemon mode:
>
> compress
> /var/log/qpidd.log {
> missingok
> notifempty
> daily
> rotate 5
> create 0660 awips fxalpha
> postrotate
> /bin/kill -HUP `cat /awips2/qpid/var/run/qpidd.pid 2> /dev/null` 2> /dev/null ||
> true
> endscript
> }
>
> Is there another way to which a sighup can be sent to qpidd to have to write to
> the new logfile?
Not presently, qpidd ignores SIGHUP. Open a JIRA for this, with details of what
you want qpidd to do on SIGUP.
Meantime perhaps you can go via syslog:
# qpidd.conf
log-to-syslog=yes
# syslog.conf
qpidd.*=/var/log/qpidd
# logrotate config for qpidd
postrotate
/usr/bin/killall -HUP syslogd
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: Logging
Posted by Bradley Scalio <Br...@noaa.gov>.
Thanks for the great turnaround!
One final question then on logging. With logrotate usually a postrotate
sighup on the pidfile will cause the process to then write to the new
logs, but this isn't working either for qpid when running in daemon mode:
compress
/var/log/qpidd.log {
missingok
notifempty
daily
rotate 5
create 0660 awips fxalpha
postrotate
/bin/kill -HUP `cat /awips2/qpid/var/run/qpidd.pid 2>
/dev/null` 2> /dev/null || true
endscript
}
Is there another way to which a sighup can be sent to qpidd to have to
write to the new logfile?
Thanks
On 09/13/2011 08:46 AM, Alan Conway wrote:
> On 09/13/2011 08:28 AM, Bradley Scalio wrote:
>> Greetings,
>>
>> Trying to turn off logging to /var/log/messages and send qpidd
>> logging to
>> /var/log/qpidd.log
>>
>> I tried the following in our qpidd.conf:
>>
>> sed -i '$a log-to-file=/var/log/qpidd.log' qpidd.conf
>> sed -i '$a log-to-syslog=no' qpidd.conf
>>
>> I get logging to /var/log/qpidd.log but I still am receiving
>> duplicates to
>> /var/log/messages.
>>
>> I know there are ample log sink options and variations, and have
>> tested a few to
>> no avail, including syslog-name=qpidd.log
>>
>> Is there a basic setup to not log to syslog?
>>
>
> That's a bug, log-to-syslog=no should disable syslog logging. Can you
> raise a JIRA at https://issues.apache.org/jira/secure/Dashboard.jspa
> to track this?
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
--
Bradley M Scalio, RHCE RHCSS
Principal Engineer w/Honors
AWIPS Mission Assurance
Mission Operations& Services
Raytheon Company
(o) +301-495-2277
(c) +301-830-0207
(f) +301-713-1950
Re: Logging
Posted by Alan Conway <ac...@redhat.com>.
On 09/13/2011 08:28 AM, Bradley Scalio wrote:
> Greetings,
>
> Trying to turn off logging to /var/log/messages and send qpidd logging to
> /var/log/qpidd.log
>
> I tried the following in our qpidd.conf:
>
> sed -i '$a log-to-file=/var/log/qpidd.log' qpidd.conf
> sed -i '$a log-to-syslog=no' qpidd.conf
>
> I get logging to /var/log/qpidd.log but I still am receiving duplicates to
> /var/log/messages.
>
> I know there are ample log sink options and variations, and have tested a few to
> no avail, including syslog-name=qpidd.log
>
> Is there a basic setup to not log to syslog?
>
That's a bug, log-to-syslog=no should disable syslog logging. Can you raise a
JIRA at https://issues.apache.org/jira/secure/Dashboard.jspa to track this?
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: Logging
Posted by Pavel Moravec <pm...@redhat.com>.
Hello,
I can confirm the below. It occurs when qpidd runs as a daemon:
qpidd --log-to-syslog no --log-to-file /tmp/qpidd.txt -d
causes logs go to syslog, while:
qpidd --log-to-syslog no --log-to-file /tmp/qpidd.txt
doesn't log to syslog.
I think the issue is caused by -d flag overriding log-to-syslog option:
Daemon options:
-d [ --daemon ] Run as a daemon. Logs to syslog by default in
this mode.
I have already created https://issues.apache.org/jira/browse/QPID-3482 for it, I suppose potential fix can be quite easy.
Kind regards,
Pavel Moravec
GSS SEG
Red Hat
----- Original Message -----
> From: "Bradley Scalio" <Br...@noaa.gov>
> To: users@qpid.apache.org
> Sent: Tuesday, September 13, 2011 2:28:14 PM
> Subject: Logging
> Greetings,
>
> Trying to turn off logging to /var/log/messages and send qpidd logging
> to /var/log/qpidd.log
>
> I tried the following in our qpidd.conf:
>
> sed -i '$a log-to-file=/var/log/qpidd.log' qpidd.conf
> sed -i '$a log-to-syslog=no' qpidd.conf
>
> I get logging to /var/log/qpidd.log but I still am receiving
> duplicates
> to /var/log/messages.
>
> I know there are ample log sink options and variations, and have
> tested
> a few to no avail, including syslog-name=qpidd.log
>
> Is there a basic setup to not log to syslog?
>
> thanks
>
>
>
>
> --
> Bradley M Scalio, RHCE RHCSS
>
> Principal Engineer w/Honors
> AWIPS Mission Assurance
> Mission Operations& Services
> Raytheon Company
>
>
> (o) +301-495-2277
> (c) +301-830-0207
> (f) +301-713-1950
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org