e5191383a7
ADDED: * logging.Logger objects now are able to return a stdlib *log.Logger.
24 lines
398 B
Go
24 lines
398 B
Go
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
|
|
}
|