package
0.1.0
Repository: https://github.com/kucjac/cleango.git
Documentation: pkg.go.dev

# Functions

AddHook adds a hook to the standard xlog hooks.
Ctx will extract log Entry from context.
CtxFields will add xlog fields.
CtxPut will put log into context.
Debug logs a message at level Debug on the standard xlog.
Debugf logs a message at level Debug on the standard xlog.
Debugln logs a message at level Debug on the standard xlog.
DefaultCallerHook gets the default caller hook that sets up the caller for the level fatal, error, panic, warn and trace.
Error logs a message at level Error on the standard xlog.
Errorf logs a message at level Error on the standard xlog.
Errorln logs a message at level Error on the standard xlog.
ExtractHTTPField will extract http option.
Fatal logs a message at level Fatal on the standard xlog then the process will exit with status set to 1.
Fatalf logs a message at level Fatal on the standard xlog then the process will exit with status set to 1.
Fatalln logs a message at level Fatal on the standard xlog then the process will exit with status set to 1.
GetLevel returns the standard xlog level.
Info logs a message at level Info on the standard xlog.
Infof logs a message at level Info on the standard xlog.
Infoln logs a message at level Info on the standard xlog.
IsLevelEnabled checks if the log level of the standard xlog is greater than the level param.
New will create new instance if logrus.
NewCallerHook creates a new CallerHook.
NewTextFormatter creates new logrus based text formatter.
Panic logs a message at level Panic on the standard xlog.
Panicf logs a message at level Panic on the standard xlog.
Panicln logs a message at level Panic on the standard xlog.
Print logs a message at level Info on the standard xlog.
Printf logs a message at level Info on the standard xlog.
PrintfHTTPReq will log request on specific level.
Println logs a message at level Info on the standard xlog.
Req will pull xlog from request context.
ReqWrap will put xlog into request context.
SetFormatter sets the standard xlog formatter.
SetLevel sets the standard xlog level.
SetOutput sets the standard xlog output.
SetReportCaller sets whether the standard xlog will include the calling method as a field.
StdLogger returns standart xlog.
Trace logs a message at level Trace on the standard xlog.
Tracef logs a message at level Trace on the standard xlog.
Traceln logs a message at level Trace on the standard xlog.
Warn logs a message at level Warn on the standard xlog.
Warnf logs a message at level Warn on the standard xlog.
Warning logs a message at level Warn on the standard xlog.
Warningf logs a message at level Warn on the standard xlog.
Warningln logs a message at level Warn on the standard xlog.
Warnln logs a message at level Warn on the standard xlog.
WithContext returns a new log entry with given context.
WithErr creates an entry from the standard xlog and adds an error to it, using the value defined in ErrorKey as key.
WithField creates an entry from the standard xlog and adds a field to it.
WithFields creates an entry from the standard xlog and adds multiple fields to it.
WithTime creats an entry from the standard xlog and overrides the time of logs generated with it.

# Constants

CtxLogger represents key in context.
HTTPRequestKey key used in fields to log http request data.

# Variables

NoHTTPOpt means no request ke was found.

# Structs

CallerHook is the logrus.Hook that sets up the logrus.Entry.Caller field.
ColorScheme represents colors used with terminal.
HTTPRequest for logging HTTP requests.
Log is wrapper around logrus.
RequestIDHook is a logging hook used to log the request id stored in the context metadata.
TextFormatter is struct implementing Format interface this is useful for formatting logs in different environments.
UserIDHook is a hook that gets the user id from the context metadata and logs it on each log level.

# Interfaces

Logger is interface which satisfies Entry and Log.

# Type aliases

CtxKey represents custom type for context.