Documentation ¶
Index ¶
- Constants
- func CtxLoggingEnabled() bool
- func SetLogLevel(logger Logger, level Level)
- func Sync()
- type Field
- func Any(key string, val interface{}) Field
- func Binary(key string, val []byte) Field
- func Bool(key string, val bool) Field
- func Bools(key string, vals []bool) Field
- func ByteString(key string, val []byte) Field
- func ByteStrings(key string, vals [][]byte) Field
- func Duration(key string, val time.Duration) Field
- func Durations(key string, vals []time.Duration) Field
- func Error(err error) Field
- func Errors(key string, errs []error) Field
- func Float32(key string, val float32) Field
- func Float32s(key string, vals []float32) Field
- func Float64(key string, val float64) Field
- func Float64s(key string, vals []float64) Field
- func Int(key string, val int) Field
- func Int32(key string, val int32) Field
- func Int64(key string, val int64) Field
- func Int64s(key string, vals []int64) Field
- func Ints(key string, vals []int) Field
- func NamedError(key string, err error) Field
- func Namespace(key string) Field
- func Object(key string, val interface{}) Field
- func Skip() Field
- func Stack(key string) Field
- func String(key string, val string) Field
- func Stringer(key string, val fmt.Stringer) Field
- func Strings(key string, vals []string) Field
- func Time(key string, val time.Time) Field
- func Times(key string, vals []time.Time) Field
- type Format
- type Level
- type Logger
- type StructuredLogger
Constants ¶
View Source
const ( EnvKeyLogCtx = "FLOGO_LOG_CTX" EnvKeyLogDateFormat = "FLOGO_LOG_DTFORMAT" DefaultLogDateFormat = "2006-01-02 15:04:05.000" EnvKeyLogLevel = "FLOGO_LOG_LEVEL" DefaultLogLevel = InfoLevel EnvKeyLogFormat = "FLOGO_LOG_FORMAT" DefaultLogFormat = FormatConsole TraceLevel Level = iota DebugLevel InfoLevel WarnLevel ErrorLevel FormatConsole Format = iota FormatJson )
Variables ¶
This section is empty.
Functions ¶
func CtxLoggingEnabled ¶
func CtxLoggingEnabled() bool
func SetLogLevel ¶
Types ¶
type Logger ¶
type Logger interface { DebugEnabled() bool TraceEnabled() bool Trace(args ...interface{}) Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Error(args ...interface{}) Tracef(template string, args ...interface{}) Debugf(template string, args ...interface{}) Infof(template string, args ...interface{}) Warnf(template string, args ...interface{}) Errorf(template string, args ...interface{}) Structured() StructuredLogger }
func ChildLogger ¶
func ChildLoggerWithFields ¶
func RootLogger ¶
func RootLogger() Logger
Click to show internal directories.
Click to hide internal directories.