logger

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewZapLogger

func NewZapLogger() *zap.Logger

NewZapLogger returns a zap logger at debug level (legacy).

func NewZapLoggerWithConfig

func NewZapLoggerWithConfig(cfg ZapLoggerConfig) *zap.Logger

NewZapLoggerWithConfig returns a zap logger from config. Level and Output can be extended later.

Types

type ZapAdapter

type ZapAdapter struct {
	// contains filtered or unexported fields
}

ZapAdapter implements go.temporal.io/sdk/log.Logger using zap.

func NewZapAdapter

func NewZapAdapter(zapLogger *zap.Logger) *ZapAdapter

NewZapAdapter returns a ZapAdapter that logs via zap. Use with NewZapLoggerWithConfig.

func (*ZapAdapter) Debug

func (z *ZapAdapter) Debug(msg string, keyvals ...interface{})

func (*ZapAdapter) Error

func (z *ZapAdapter) Error(msg string, keyvals ...interface{})

func (*ZapAdapter) Info

func (z *ZapAdapter) Info(msg string, keyvals ...interface{})

func (*ZapAdapter) Warn

func (z *ZapAdapter) Warn(msg string, keyvals ...interface{})

func (*ZapAdapter) With

func (z *ZapAdapter) With(keyvals ...interface{}) log.Logger

func (*ZapAdapter) WithCallerSkip

func (z *ZapAdapter) WithCallerSkip(skip int) log.Logger

type ZapLoggerConfig

type ZapLoggerConfig struct {
	Level  string // debug, info, warn, error
	Output string // stdout, stderr, or file path. Empty = stdout (backward compat)
}

ZapLoggerConfig configures a zap logger. Extensible for future options (encoding, sampling, etc.).

Jump to

Keyboard shortcuts

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