log: ignore fatal flag for logging purposes
Running with G_DEBUG=fatal-warnings will end up reporting warning logs with G_LOG_FLAG_FATAL, which breaks our own logging logic.
This commit is contained in:
@@ -100,6 +100,11 @@ mm_to_syslog_priority (MMLogLevel level)
|
|||||||
static int
|
static int
|
||||||
glib_to_syslog_priority (GLogLevelFlags level)
|
glib_to_syslog_priority (GLogLevelFlags level)
|
||||||
{
|
{
|
||||||
|
/* if the log was flagged as fatal (e.g. G_DEBUG=fatal-warnings), ignore
|
||||||
|
* the fatal flag for logging purposes */
|
||||||
|
if (level & G_LOG_FLAG_FATAL)
|
||||||
|
level &= ~G_LOG_FLAG_FATAL;
|
||||||
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case G_LOG_LEVEL_ERROR:
|
case G_LOG_LEVEL_ERROR:
|
||||||
return LOG_CRIT;
|
return LOG_CRIT;
|
||||||
|
Reference in New Issue
Block a user