Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(msg string)
- func DebugLog(ctx context.Context, module string, msg string)
- func Debugf(msg string, args ...interface{})
- func DebugfLog(ctx context.Context, module string, msg string, args ...interface{})
- func Error(msg string)
- func ErrorLog(ctx context.Context, module string, msg string)
- func Errorf(msg string, args ...interface{})
- func ErrorfLog(ctx context.Context, module string, msg string, args ...interface{})
- func Fatal(msg string)
- func FatalLog(ctx context.Context, module string, msg string)
- func Fatalf(msg string, args ...interface{})
- func FatalfLog(ctx context.Context, module string, msg string, args ...interface{})
- func HandleWarningMessages(warnings []string)
- func HandleWarningMessagesLog(ctx context.Context, module string, warnings []string)
- func Info(msg string)
- func InfoLog(ctx context.Context, module string, msg string)
- func Infof(msg string, args ...interface{})
- func InfofLog(ctx context.Context, module string, msg string, args ...interface{})
- func Initialize(mr bool, logFile string, customLogsDir string)
- func Warning(msg string)
- func WarningLog(ctx context.Context, module string, msg string)
- func Warningf(msg string, args ...interface{})
- func WarningfLog(ctx context.Context, module string, msg string, args ...interface{})
- func WithOperationID(ctx context.Context, msg string) string
- type LogInfo
- type LogWriter
- type OutMessage
- type Writer
Constants ¶
const (
ModuleID = "LOG"
)
Variables ¶
var ActiveLogFile string
ActiveLogFile log file represents the file which will be used for the backend logging
Functions ¶
func Debug ¶
func Debug(msg string)
Debug logs DEBUG messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Debugf ¶
func Debugf(msg string, args ...interface{})
Debugf logs DEBUG messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Error ¶
func Error(msg string)
Error logs ERROR messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Errorf ¶
func Errorf(msg string, args ...interface{})
Errorf logs ERROR messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Fatal ¶
func Fatal(msg string)
Fatal logs CRITICAL messages and exits. stdout flag indicates if message is to be written to stdout in addition to log.
func Fatalf ¶
func Fatalf(msg string, args ...interface{})
Fatalf logs CRITICAL messages and exits. stdout flag indicates if message is to be written to stdout in addition to log.
func HandleWarningMessages ¶
func HandleWarningMessages(warnings []string)
HandleWarningMessages logs multiple messages in WARNING mode
func Info ¶
func Info(msg string)
Info logs INFO messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Infof ¶
func Infof(msg string, args ...interface{})
Infof logs INFO messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Initialize ¶
Initialize logger with given level
func Warning ¶
func Warning(msg string)
Warning logs WARNING messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Warningf ¶
func Warningf(msg string, args ...interface{})
Warningf logs WARNING messages. stdout flag indicates if message is to be written to stdout in addition to log.
func WarningfLog ¶
Types ¶
type OutMessage ¶
OutMessage contains information for output log
func (*OutMessage) ToJSON ¶
func (out *OutMessage) ToJSON() (string, error)
ToJSON converts OutMessage into JSON