Documentation
¶
Index ¶
- func NewZapLogger() *zap.Logger
- func NewZapLoggerWithConfig(cfg ZapLoggerConfig) *zap.Logger
- type ZapAdapter
- func (z *ZapAdapter) Debug(msg string, keyvals ...interface{})
- func (z *ZapAdapter) Error(msg string, keyvals ...interface{})
- func (z *ZapAdapter) Info(msg string, keyvals ...interface{})
- func (z *ZapAdapter) Warn(msg string, keyvals ...interface{})
- func (z *ZapAdapter) With(keyvals ...interface{}) log.Logger
- func (z *ZapAdapter) WithCallerSkip(skip int) log.Logger
- type ZapLoggerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewZapLogger ¶
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.).
Click to show internal directories.
Click to hide internal directories.