package
1.101.9
Repository: https://github.com/vonage/gosrvlib.git
Documentation: pkg.go.dev

# Functions

Close closes an object and logs an error in case of failure.
FromContext retrieves a logger instance form the given context.
NewDefaultLogger configures a logger with the default fields.
NewLogger configures a root logger for the application.
NopLogger returns a no operation logger.
ParseFormat converts a string to a log format.
ParseLevel converts syslog standard levels to zap a log level.
Sync flushes the given logger and ignores the error.
WithComponent creates a child logger with an extra "component" tag.
WithComponentAndMethod creates a child logger with extra "component" and "method" tags.
WithErrorOutputPaths manually overrides the ErrorOutputPaths option.
WithFields add static fields to the logger.
WithFormat manually overrides the environment log format.
WithFormatStr manually overrides the environment log format.
WithIncrementLogMetricsFunc replaces the default log level metrics function.
WithLevel manually overrides the environment log level.
WithLevelFunctionHook registers a function with a level string argument which will be called each time the Logger writes out an Entry.
WithLevelStr manually overrides the environment log level.
WithLogger returns a new context with the given logger.
WithOutputPaths manually overrides the OutputPaths option.

# Constants

ConsoleFormat will print the log in a human friendly format.
JSONFormat will print the log in a machine readable format.

# Variables

LogFatal calls the default fatal logger.

# Interfaces

Syncer is an interface to allow the testing of log syncing.

# Type aliases

Format represents the logging output format to adopt.
IncrementLogMetricsFunc is a type alias for the logging metric function.
Option is a type alias for a function that configures the application logger.