connect icon indicating copy to clipboard operation
connect copied to clipboard

Add support for stream builder SetPrintLogger with level

Open luxixing opened this issue 2 years ago • 0 comments

as we know, stream builder has method

// SetPrintLogger sets a custom logger supporting a simple Print based interface
// to be used by stream components. This custom logger will override any logging
// fields set via config.
func (s *StreamBuilder) SetPrintLogger(l PrintLogger) {
	s.customLogger = log.Wrap(l)
}

the log level is INFO default. since i want to change the level

// level is string or int must be exported as constant var
func (s *StreamBuilder) SetPrintLoggerWithLevel(l PrintLogger, level int) {
	s.customLogger = log.WrapAtLevel(l, level)
}

luxixing avatar Nov 21 '22 05:11 luxixing