// NewLogger returns a new Logger filled with given Receivers
7000
func NewLogger(recs ...*Receiver) *Logger {
	l := &Logger{
		Active:    true, // Every logger is active by default
		Receivers: recs,
	}
	return l
}
824500
func newOutputLogger(loggerToBufferFunc func(*logutilpb.Event)) logutil.Logger {
	return logutil.NewCallbackLogger(func(e *logutilpb.Event) {
		loggerToBufferFunc(e)
	})
}
82895
func NewLoginUser(ctx *middleware.Context, handler LoginUserHandler) *LoginUser {
	return &LoginUser{Context: ctx, Handler: handler}
}
166709
func Logger(r *http.Request) log.Interface {
	ctx := r.Context()
	if ll, ok := ctx.Value(loggerKey).(log.Interface); ok {
		return ll
	}
	return NewLogger(r)
}
643940
func newLogger(name string) (Logger, func(Level)) {
	logger := logging.NewLogger(name)
	logger.SetLevel(convertLevel(getLogLevel()))

	if os.Getenv("KITE_LOG_NOCOLOR") != "" {
		logging.StdoutHandler.Colorize = false
		logging.StderrHandler.Colorize = false
	}

	setLevel := func(l Level) {
		logger.SetLevel(convertLevel(l))
		logging.DefaultHandler.SetLevel(convertLevel(l))
	}

	return logger, setLevel
}
71157
func NewLogger(p Priority, facility, tag string) (Syslogger, error) {
	fPriority, err := facilityPriority(facility)
	if err != nil {
		return nil, err
	}
	priority := syslog.Priority(p) | fPriority
	l, err := newBuiltin(priority, tag)
	if err != nil {
		return nil, err
	}
	return &builtinLogger{l}, nil
}
1374434
func newLogger(tty bool, file string, verbose bool) log15.Logger {
	stdoutFormat := log15.LogfmtFormat()
	if tty {
		stdoutFormat = log15.TerminalFormat()
	}
	stdoutHandler := log15.StreamHandler(os.Stdout, stdoutFormat)
	if !verbose {
		stdoutHandler = log15.LvlFilterHandler(log15.LvlInfo, stdoutHandler)
	}
	log := log15.New()
	log.SetHandler(log15.MultiHandler(
		log15.Must.FileHandler(file, log15.LogfmtFormat()),
		stdoutHandler,
	))
	return log
}
1196828
func NewAppendLogger(f string) (*FileLogger, error) {
	return NewFileLogger(f, INFO, APPEND, 0, 0, BUFSIZE)
}
887688
func NewLogger(minLogLevel LogLevel) Logger {
	sink := writerSink{
		writer:      os.Stdout,
		minLogLevel: minLogLevel,
	}
	return &logger{
		sinks: []Sink{sink},
	}
}
588160
func New(out io.Writer, flags FlagSet) *Logger {
	return NewFormatLogger(out, flags, &FormatWriterStructured{})
}
947583
func New(out io.Writer, prefix string, flags int) *log.Logger {
	return NewLogger(prefix, flags, NewHandler(out))
}
673218
func (b *Builder) Logger(logger log.Logger) *Builder {
	b.logger = logger
	return b
}
597376
func NewDefaultLogger() Logger {
	return &defaultLogger{
		logger: log.New(os.Stdout, "", log.LstdFlags),
	}
}
23483
func NewLogger() dlog.Logger {
	return dlog.NewLogger(
		glog.Infoln,
		map[dlog.Level]func(...interface{}){
			dlog.LevelDebug: glog.Infoln,
			dlog.LevelInfo:  glog.Infoln,
			dlog.LevelWarn:  glog.Warningln,
			dlog.LevelError: glog.Errorln,
			// this relies on implementation-specific details of the generic dlog Logger implementation, not good
			dlog.LevelFatal: glog.Fatalln,
			dlog.LevelPanic: glog.Errorln,
		},
	)
}
314161
func NewLogEntryDecoder(r io.Reader) LogEntryDecoder {
	return &logEntryDecoder{
		lenBuf: make([]byte, binaryEncodeLen),
		buf:    make([]byte, 1024),
		r:      r,
	}
}
1100482
func NewLogger(writer io.Writer, name string) Logger {
	formatter, err := createFormatter(name, logxiFormat)
	if err != nil {
		panic("Could not create formatter")
	}
	return NewLogger3(writer, name, formatter)
}
163529
func NewLogger(component string) *TestLogger {
	buf := gbytes.NewBuffer()
	log := lager.NewLogger(component)
	log.RegisterSink(lager.NewWriterSink(buf, lager.DEBUG))
	return &TestLogger{log, buf}
}