Documentation
¶
Index ¶
- Constants
- func Init(ctx context.Context, opts ...Option) (context.Context, error)
- func InitWithCore(ctx context.Context, buildCore func(zap.Config) zapcore.Core, opts ...Option) (context.Context, error)
- func NormalizeLogLevel(level string) (string, error)
- func ParseLogLevel(level string) (zapcore.Level, error)
- func SetLogLevel(level string) error
- type Option
Constants ¶
View Source
const ( LogFormatJSON = "json" LogFormatConsole = "console" )
Variables ¶
This section is empty.
Functions ¶
func InitWithCore ¶ added in v0.17.0
func InitWithCore(ctx context.Context, buildCore func(zap.Config) zapcore.Core, opts ...Option) (context.Context, error)
InitWithCore creates a new zap logger and tees an additional core onto it. buildCore receives the logger config so the extra core uses the same level filtering and encoder settings as Init.
func NormalizeLogLevel ¶ added in v0.8.30
func SetLogLevel ¶ added in v0.8.30
SetLogLevel sets the log level for the active logger. Currently only used by lambda connectors.
Types ¶
type Option ¶ added in v0.1.0
func WithInitialFields ¶ added in v0.2.41
WithInitialFields allows the logger to be configured with static fields at creation time. This is useful for setting fields that are constant across all log messages.
func WithLogFormat ¶ added in v0.1.0
func WithLogLevel ¶ added in v0.1.0
func WithOutputPaths ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.