1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

log: move abort past syslog

When the abort_on_internal_errors is enabled, we aborted prior
the syslog logging output.

Since such fatal error gets level _LOG_FATAL it should
not be blocked by debug_level() check so lets move it further,
to get abort error logged also via syslog.
This commit is contained in:
Zdenek Kabelac 2012-12-14 13:57:01 +01:00
parent 575c4ed964
commit 740ab81d03
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.99 - Version 2.02.99 -
=================================== ===================================
Log output also to syslog when abort_on_internal_error is set.
Add LV snapshot support to liblvm and python-lvm. Add LV snapshot support to liblvm and python-lvm.
Avoid a global lock in pvs when lvmetad is in use. Avoid a global lock in pvs when lvmetad is in use.
Fix crash in pvscan --cache -aay triggered by non-mda PV. Fix crash in pvscan --cache -aay triggered by non-mda PV.

View File

@ -344,9 +344,6 @@ void print_log(int level, const char *file, int line, int dm_errno,
va_end(ap); va_end(ap);
} }
if (fatal_internal_error)
abort();
if (level > debug_level()) if (level > debug_level())
return; return;
@ -368,6 +365,9 @@ void print_log(int level, const char *file, int line, int dm_errno,
va_end(ap); va_end(ap);
} }
if (fatal_internal_error)
abort();
/* FIXME This code is unfinished - pre-extend & condense. */ /* FIXME This code is unfinished - pre-extend & condense. */
if (!_already_logging && _log_direct && critical_section()) { if (!_already_logging && _log_direct && critical_section()) {
_already_logging = 1; _already_logging = 1;