log

package
v0.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncoderConfig

func EncoderConfig() zapcore.EncoderConfig

Types

type LogOpts

type LogOpts struct {
	Level                 string
	File                  bool
	FileName              string
	MaxFileSizeMB         int
	MaxBackups            int
	MaxAgeDays            int
	ApplicationInsightsID string
	EnableTelemetry       bool
}

func GetDefaultLogOpts

func GetDefaultLogOpts() *LogOpts

type ZapLogger

type ZapLogger struct {
	*zap.Logger
	// contains filtered or unexported fields
}

func Logger

func Logger() *ZapLogger

func SetupZapLogger

func SetupZapLogger(lOpts *LogOpts, persistentFields ...zap.Field) (*ZapLogger, error)

func (*ZapLogger) Close

func (l *ZapLogger) Close()

func (*ZapLogger) GetZappedMiddleware

func (l *ZapLogger) GetZappedMiddleware() func(next http.Handler) http.Handler

func (*ZapLogger) Named

func (l *ZapLogger) Named(name string) *ZapLogger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL