Documentation ¶
Index ¶
- Constants
- func DefaultZapConfig(debug bool, level zapcore.Level, encoding string) zap.Config
- func NewSentryDriver(o SentryOptions) (hlog.Logger, error)
- func NewSentryDriverWith(hub *sentry.Hub) hlog.Logger
- func NewStackLoggerDriver(stackList []string, opts StackOptions) (hlog.Logger, error)
- func NewStackLoggerDriverWith(lvl hlog.Level, stack map[string]hlog.Logger) hlog.Logger
- func NewZapDriver(logger *zap.Logger) hlog.Logger
- func NewZapDriverFromConfig(cfg zap.Config) hlog.Logger
- type SentryOptions
- type StackOptions
- type StackedLogger
- type ZapOptions
Constants ¶
View Source
const ( ZapLogger = "zap" SentryLogger = "sentry" PrinterLogger = "printer" )
Variables ¶
This section is empty.
Functions ¶
func DefaultZapConfig ¶
DefaultZapConfig generate zap config using default values. You can leave encoding empty to set to the default value which is json.
func NewSentryDriver ¶
func NewSentryDriver(o SentryOptions) (hlog.Logger, error)
NewSentryDriver return new instance of hexa logger with sentry driver.
func NewSentryDriverWith ¶
NewSentryDriverWith get the sentry hub and returns new instance of sentry driver for hexa logger.
func NewStackLoggerDriver ¶
func NewStackLoggerDriver(stackList []string, opts StackOptions) (hlog.Logger, error)
NewStackLoggerDriver return new stacked logger . If logger name is invalid,it will return error.
func NewStackLoggerDriverWith ¶
NewStackLoggerDriverWith return new instance of hexa logger with stacked logger driver.
func NewZapDriver ¶
NewZapDriver return new instance of hexa logger with zap driver.
Types ¶
type SentryOptions ¶
type StackOptions ¶
type StackOptions struct { Level hlog.Level ZapConfig zap.Config SentryOpts *SentryOptions }
type StackedLogger ¶
type ZapOptions ¶
Click to show internal directories.
Click to hide internal directories.