ADDED:
* logging.Logger objects now are able to return a stdlib *log.Logger.
This commit is contained in:
brent saner committed 2024-06-19 18:57:26 -04:00
1 parent ae49f42c0c
commit e5191383a7
12 files changed
+198

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
package logging
import (
`r00t2.io/goutils/bitmask`
)
// HasFlag provides a wrapper for functionality to the underlying bitmask.MaskBit.
func (l *logPrio) HasFlag(prio logPrio) (hasFlag bool) {
var m *bitmask.MaskBit
var p *bitmask.MaskBit
if l == nil {
return
}
m = bitmask.NewMaskBitExplicit(uint(*l))
p = bitmask.NewMaskBitExplicit(uint(prio))
hasFlag = m.HasFlag(*p)
return
}