github.com/v2pro/plz@v0.0.0-20221028024117-e5f9aec5b631/countlog/output/hrf/level.go (about)

     1  package hrf
     2  
     3  import (
     4  	"github.com/v2pro/plz/countlog/spi"
     5  )
     6  
     7  type levelFormatter struct {
     8  }
     9  
    10  func (formatter *levelFormatter) Format(space []byte, event *spi.Event) []byte {
    11  	return append(space, spi.ColoredLevelName(event.Level)...)
    12  }