Documentation ¶
Index ¶
- Variables
- func Adorn(m logrus.Fields)
- func CreateContextForLogging(ctx context.Context, transactionId string, threadName string, actionID string, ...) context.Context
- func LogWithFields(ctx context.Context) *logrus.Entry
- func SetLogFormat(format LogFormat)
- func SetLogLevel(level string)
- type LogFormat
- type SysLogFormatter
Constants ¶
This section is empty.
Variables ¶
View Source
var Log *logrus.Entry
Functions ¶
func CreateContextForLogging ¶
func CreateContextForLogging(ctx context.Context, transactionId string, threadName string, actionID string, actionName string, podName string) context.Context
CreateContextForLogging is to get the context with all the parameters those needed for log
func LogWithFields ¶
LogWithFields add fields to log
func SetLogFormat ¶
func SetLogFormat(format LogFormat)
SetLogFormat sets the giving input as logging format
Types ¶
type LogFormat ¶
type LogFormat uint32
LogFormat is custom type created for the log formats supported by ODIM
func ParseLogFormat ¶
ParseLogFormat takes a string level and returns the log format.
func (LogFormat) MarshalText ¶
MarshalText will validate the log format and return the corresponding string
func (*LogFormat) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type SysLogFormatter ¶
type SysLogFormatter struct{}
SysLogFormatter implements logrus Format interface. It provides a formatter for odim in syslog format
Click to show internal directories.
Click to hide internal directories.