diff --git a/moo/lib/fmtout.c b/moo/lib/fmtout.c index 8b6ef52..39a2562 100644 --- a/moo/lib/fmtout.c +++ b/moo/lib/fmtout.c @@ -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;