set the default log type if not set
This commit is contained in:
parent
c13fe9b769
commit
0017564a69
@ -670,6 +670,12 @@ moo_ooi_t moo_logbfmt (moo_t* moo, moo_bitmask_t mask, const moo_bch_t* fmt, ...
|
||||
* it'll get turned back on */
|
||||
mask |= (moo->log.default_type_mask & MOO_LOG_ALL_TYPES);
|
||||
}
|
||||
else if (!(mask & MOO_LOG_ALL_TYPES))
|
||||
{
|
||||
/* no type is set in the given mask and no default type is set.
|
||||
* make it UNTYPED. */
|
||||
mask |= MOO_LOG_UNTYPED;
|
||||
}
|
||||
|
||||
fo.mask = mask;
|
||||
fo.putch = put_ooch;
|
||||
@ -698,6 +704,10 @@ moo_ooi_t moo_logufmt (moo_t* moo, moo_bitmask_t mask, const moo_uch_t* fmt, ...
|
||||
mask &= ~MOO_LOG_UNTYPED;
|
||||
mask |= (moo->log.default_type_mask & MOO_LOG_ALL_TYPES);
|
||||
}
|
||||
else if (!(mask & MOO_LOG_ALL_TYPES))
|
||||
{
|
||||
mask |= MOO_LOG_UNTYPED;
|
||||
}
|
||||
|
||||
fo.mask = mask;
|
||||
fo.putch = put_ooch;
|
||||
|
Loading…
Reference in New Issue
Block a user