In dmeventd, bridge LVM error log output to syslog.
PATCH 1/1 In dmeventd, bridge LVM error log output to syslog.
Hi,
as discussed, this is the first part of dmeventd logging. I am not touching any options related to debugging, that will come as a separate patch later. This patch provides the necessary minimum for any useful diagnostics of dmeventd/lvconvert --repair issues.
(I have tested this and it works for me.)
Yours,
Petr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmeventd-logging.diff
Type: text/x-diff
Size: 2088 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20100506/99cc683f/attachment.bin>
PATCH 1/1 In dmeventd, bridge LVM error log output to syslog.
Quoted 4 lines · Peter Rockai
as discussed, this is the first part of dmeventd logging. I am not touching any options related to debugging, that will come as a separate patch later. This patch provides the necessary minimum for any useful diagnostics of dmeventd/lvconvert --repair issues.
Sorry, but I don't understand this yet.
What changes are you intending to make to the log messages?
Previously *all* messages got logged, but only as either CRIT or as DEBUG, so the sysadmin had a choice of seeing all messages (including trival ones) or only the most critical messages.
The new patch appears to drop some messages instead of logging them!
I'd prefer to see a patch that adds a middle category, taking some of the DEBUG messages and logging them as ERR or WARN.
Alasdair
PATCH 1/1 In dmeventd, bridge LVM error log output to syslog.
Hi,
Quoted 6 lines · Alasdair G Kergon
Quoted 4 lines · Peter Rockai
as discussed, this is the first part of dmeventd logging. I am not touching any options related to debugging, that will come as a separate patch later. This patch provides the necessary minimum for any useful diagnostics of dmeventd/lvconvert --repair issues.
Quoted 6 lines
Sorry, but I don't understand this yet.
What changes are you intending to make to the log messages?Previously *all* messages got logged, but only as either CRIT or as DEBUG, so the sysadmin had a choice of seeing all messages (including trival ones) or only the most critical messages.
Now this is interesting...
Quoted 1 line
The new patch appears to drop some messages instead of logging them!
!
There used to be this:
- lvm2_log_level(_lvm_handle, LVM2_LOG_SUPPRESS);
- /* FIXME Temporary: move to dmeventd core */
but that disappeared with this patch:
Thu Jan 21 23:15:46 CET 2010 agk
Add libdevmapper-event-lvm2.so to serialise dmeventd plugin liblvm2cmd use.
so it seems that versions of dmeventd since this patch spam syslog with everything, unconditionally. I wasn't aware of this behaviour change. Either way, I think what we have now is wrong -- a couple of dmeventd events produced something like 2 megabytes of logs.
What we had *originally* (before end of January) was to log nothing, now we log everything as DEBUG. This patch logs things at their right priority and suppresses -vvvv-style output to syslog, which I think is a good thing (this will likely bog down some syslog implementations).
Quoted 2 lines
I'd prefer to see a patch that adds a middle category, taking some of the DEBUG messages and logging them as ERR or WARN.
I will submit a patch later that changes the commandline options, so we can optionally enable the DEBUG logs to syslog with a -d-style option to dmeventd. For users, it doesn't make any sense to be logging at the most verbose level, to syslog.
Yours,
Petr.
PATCH 1/1 In dmeventd, bridge LVM error log output to syslog.
Quoted 7 lines · Petr Rockai
Quoted 2 lines
I'd prefer to see a patch that adds a middle category, taking some of the DEBUG messages and logging them as ERR or WARN.
I will submit a patch later that changes the commandline options, so we can optionally enable the DEBUG logs to syslog with a -d-style option to dmeventd. For users, it doesn't make any sense to be logging at the most verbose level, to syslog.
Since Alasdair said this can't go in without the commandline options, there's a patch that does both.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmeventd-logging-1.diff
Type: text/x-diff
Size: 4639 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20100512/0241ee3f/attachment.bin>
PATCH 1/1 In dmeventd, bridge LVM error log output to syslog.
Quoted 2 lines · Peter Rockai
Since Alasdair said this can't go in without the commandline options, there's a patch that does both.
Sort-of ack, assuming the patch does what I think it's trying to. (It doesn't apply against upstream - probably depends on part of some earlier patch.)
Alasdair