// New manually creates a logger.
//
// This function should only be used out of a request. Use FromContext in request.
506028
func New(c Config) Logger {
	var l *logger
	if c.DisablePooling {
		l = &logger{}
	} else {
		l = loggerPool.Get().(*logger)
	}
	l.level = c.Level
	l.output = c.Output
	if l.output == nil {
		l.output = NewOutputChannel(NewConsoleOutput())
	}
	for k, v := range c.Fields {
		l.SetField(k, v)
	}
	l.disablePooling = c.DisablePooling
	return l
}
689357
func (rl *RevelLogger) New(ctx ...interface{}) MultiLogger {
	old := &RevelLogger{Logger: rl.Logger.New(ctx...)}
	return old
}
609726
func New(config Config) gin.HandlerFunc {
	cors := newCors(config)
	return func(c *gin.Context) {
		cors.applyCors(c)
	}
}
1327892
func New(
	bundle []ct.ASN1Cert,
	logger blog.Logger,
	stats metrics.Scope,
) *Impl {
	return &Impl{
		issuerBundle: bundle,
		ctLogsCache: logCache{
			logs: make(map[string]*Log),
		},
		log:     logger,
		metrics: initMetrics(stats),
	}
}
71351
func (c *context) New(prefixes ...interface{}) Logger {
	return newContext(c.logger, c.prefix, prefixes...)
}
1333310
func New(logger *logrus.Logger) goa.LogAdapter {
	return FromEntry(logrus.NewEntry(logger))
}
1047462
func New(logger log.Logger) func(http.Handler) http.Handler {
	return func(h http.Handler) http.Handler {
		return &Logger{
			logger: logger,
			h:      h,
		}
	}
}
385462
func New(endpoint string, tlsConfig *tls.Config, proxy func(*http.Request) (*url.URL, error)) LoggregatorConsumer {
	return &consumer{endpoint: endpoint, tlsConfig: tlsConfig, proxy: proxy, debugPrinter: nullDebugPrinter{}}
}
536453
func NewLogger() *Logger {
	logger := &Logger{*log.New(os.Stdout, "", log.LstdFlags), false, false}
	return logger
}
625467
func NewLogger() *Logger {
	logger := &coreLogger{
		ErrorWriter: os.Stderr,
		BufferSize:  1024,
		MaxLevel:    LevelDebug,
		Targets:     make([]Target, 0),
	}
	return &Logger{logger, "app", DefaultFormatter}
}
1114464
func New(c *Options) (s *Server) {
	c.ensure()
	s = &Server{
		cfg:    c,
		Logger: log.Get(PkgName),
		Binder: new(binder),
		router: router.New(router.Options{}),
		routes: make(map[string]router.Route),
	}
	s.stdLogger = slog.New(s.Logger, "web > ", 0)
	s.ctxPool = newContextPool(s)
	return s
}
1213220
func New(indexPrefix, typeName, JobType, WorkerName string, Code, ElapsedTime int, success ...bool) *LogEntry {
	now := time.Now()
	index := fmt.Sprintf("%v-%04d-%02d-%02d", indexPrefix, now.Year(), now.Month(), now.Day())

	requestMetadata := RequestMetadata{JobType, WorkerName}
	request := Request{Metadata: requestMetadata}

	Success := (Code < 500)
	if len(success) > 0 {
		Success = success[0]
	}

	responseMetadata := ResponseMetadata{Code: Code, Success: Success}
	response := Response{Metadata: responseMetadata}

	Date := int((now.UnixNano() / 1000000)) - ElapsedTime
	body := Body{Request: request, Response: response, ElapsedTime: ElapsedTime, Date: Date, Index: index, Type: typeName}
	return &LogEntry{Index: index, Type: typeName, Body: body}
}
925783
func New(log Logger) *Logtap {
	if log == nil {
		log = lumber.NewConsoleLogger(lumber.ERROR)
	}
	return &Logtap{
		log:    log,
		drains: make(map[string]drainChannels),
	}
}
1288991
func New() (e *Echo) {
	return NewWithContext(func(e *Echo) Context {
		return NewContext(nil, nil, e)
	})
}
960511
func newLogger(c *Context) (log15.Logger, error) {
	lvl := c.String(FlagLogLevel)
	l := log15.New()
	log.Println(fmt.Sprintf("Using log level %s", lvl))
	v, err := log15.LvlFromString(lvl)
	if err != nil {
		return l, err
	}
	h := log15.LvlFilterHandler(v, log15.StreamHandler(os.Stdout, log15.LogfmtFormat()))
	if lvl == "debug" {
		h = log15.CallerFileHandler(h)
	}
	l.SetHandler(log15.LazyHandler(h))
	return l, err
}
1204331
func New(logger hclog.Logger, shutdownCh chan struct{}, connPoolPinger Pinger) (m *Manager) {
	logger = logger.Named("server_mgr")
	return &Manager{
		logger:         logger,
		connPoolPinger: connPoolPinger,
		rebalanceTimer: time.NewTimer(clientRPCMinReuseDuration),
		shutdownCh:     shutdownCh,
	}
}
645978
func New() *Logs {
	logs := &Logs{
		loggers: make([]*logger, levelSize, levelSize),
	}

	for index := range logs.loggers {
		logs.loggers[index] = newLogger("", 0)
	}

	return logs
}