# Functions
DefaultCodeToLevel is the helper mapper that maps HTTP Response codes to log levels.
DefaultCodeToLevelGRPC is the helper mapper that maps gRPC Response codes to log levels.
DefaultDeciderMethod is the default implementation of decider to see if you should log the call by default this is set to LogStartAndFinishCall.
DefaultErrorToCode returns an InternalServerError.
DefaultFilterLogging allows logs from all levels to be logged in output.
DurationToTimeMillisFields converts the duration to milliseconds and uses the key `http.time_ms`.
NewGRPCOption adds in the config options for logging middleware.
NewHTTPOption returns a http config option.
NewHTTPServerMiddleware returns an http middleware.
NewLogger returns a log.Logger that prints in the provided format at the provided level with a UTC timestamp and the caller of the log entry.
NewRequestConfig parses the string into a req logging config structure.
TODO: @yashrsharma44 - To be deprecated in the next release.
TODO: @yashrsharma44 - To be deprecated in the next release.
WithDecider customizes the function for deciding if the HTTP Middlewares/Tripperwares should log.
WithFilter customizes the function for deciding which level of logging should be allowed.
WithLevels customizes the function for mapping HTTP response codes and interceptor log level statements.
# Constants
LogFinishCall - Only finish logs of request is enabled.
LogStartAndFinishCall - Logging of start and end of request is enabled.
NoLogCall - Logging is disabled.
# Variables
LogDecision defines mapping of flag options to the logging decision.
MapAllowedLevels allows to map a given level to a list of allowed level.
# Type aliases
CodeToLevel function defines the mapping between HTTP Response codes to log levels for server side.
Decider function defines rules for suppressing the logging.
Decision defines rules for enabling start and end of logging.
DurationToFields function defines how to produce duration fields for logging.
ErrorToCode function determines the error code of the error for the http response.
Fields represents logging fields.
FilterLogging makes sure only the logs with level=lvl gets logged, or filtered.
Types for the Options.