Documentation ¶
Overview ¶
Package constants exposes constants used throughout the module
For the full guide visit https://gitlab.com/usvc/modules/go/log
Index ¶
Constants ¶
const DefaultFluentDHost = "localhost"
const DefaultFluentDPort = 24224
const DefaultFluentDTag = "app"
const DefaultFluentDTimeout = 5 * time.Second
const DefaultInitializeRetryCount = -1
const DefaultInitializeRetryInterval = 3 * time.Second
const FieldData = "@data"
FieldData defines what the data field should be tagged (applies only for JSONFormatter)
const FieldFile = "@file"
FieldFile defines the key for the value containing the file name and line
const FieldFunction = "@function"
FieldFunction defines the key for the value containing the function name
const FieldLevel = "@level"
FieldLevel defines the key for the value containing the level of the log entry
const FieldMessage = "@message"
FieldMessage defines the key for the value containing the message of the log entry
const FieldTimestamp = "@timestamp"
FieldTimestamp defines the key for the value containing the timestamp of the log entry
const TimestampFormat = "2006-01-02T15:04:05"
TimestampFormat defines the format which all logs should be in within the usvc namespace
Variables ¶
var DefaultFieldMap = logrus.FieldMap{ logrus.FieldKeyTime: FieldTimestamp, logrus.FieldKeyMsg: FieldMessage, logrus.FieldKeyLevel: FieldLevel, logrus.FieldKeyFunc: FieldFunction, logrus.FieldKeyFile: FieldFile, }
DefaultFieldMap sets the FieldMap property of the TextFormatter and JSONFormatter classes that define how logrus outputs logs
var DefaultHookLevels = []logrus.Level{ logrus.TraceLevel, logrus.DebugLevel, logrus.InfoLevel, logrus.WarnLevel, logrus.ErrorLevel, logrus.PanicLevel, logrus.FatalLevel, }
DefaultHookLevels can be used to set the levels for which the logrus hook will be activated if you'd like the hook to be activated on all levels of logs
Functions ¶
This section is empty.
Types ¶
This section is empty.