Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDebugLoggerConfig ¶
NewDebugLoggerConfig returns a new default development logger config.
func NewDevelopmentLoggerConfig ¶
NewDevelopmentLoggerConfig returns a new default development logger config.
func NewLoggerConfigForGCP ¶
NewLoggerConfigForGCP returns a new default production configuration for GCP.
func NewProductionLoggerConfig ¶
NewProductionLoggerConfig returns a new default production configuration.
func ReplaceGloabl ¶
func ReplaceGloabl(logger Logger) func()
ReplaceGloabl replaces the global loggers and returns a function to reset the loggers to the previous state.
Types ¶
type Logger ¶
type Logger = *zap.SugaredLogger
func NewDebugLogger ¶
NewDevelopmentLogger returns a new logger using the default development configuration.
func NewDevelopmentLogger ¶
NewDevelopmentLogger returns a new logger using the default development configuration.
func NewLoggerForGCP ¶
NewLoggerForGCP returns a new logger using the default production configuration.
func NewObservedTestLogger ¶
func NewObservedTestLogger(tb testing.TB) (Logger, *observer.ObservedLogs)
NewObservedTestLogger is like NewTestLogger but also saves logs to an in memory observer.
func NewTestLogger ¶
NewTestLogger directs logs to the go test logger.