Documentation ¶
Index ¶
- type Client
- type Config
- type Field
- func FmtAny(value interface{}, name string) Field
- func FmtAnys(values []interface{}, name string) Field
- func FmtBool(value bool, name string) Field
- func FmtBools(values []bool, name string) Field
- func FmtByte(value byte, name string) Field
- func FmtBytes(value []byte, name string) Field
- func FmtDuration(value time.Duration, name string) Field
- func FmtDurations(values []time.Duration, name string) Field
- func FmtError(err error) Field
- func FmtFloat32(value float32, name string) Field
- func FmtFloat32s(values []float32, name string) Field
- func FmtFloat64(value float64, name string) Field
- func FmtFloat64s(values []float64, name string) Field
- func FmtInt(value int, name string) Field
- func FmtInt32(value int32, name string) Field
- func FmtInt32s(values []int32, name string) Field
- func FmtInt64(value int64, name string) Field
- func FmtInt64s(values []int64, name string) Field
- func FmtInts(values []int, name string) Field
- func FmtString(value string, name string) Field
- func FmtStrings(values []string, name string) Field
- func FmtTime(value time.Time, name string) Field
- func FmtTimes(values []time.Time, name string) Field
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Debug(ctx context.Context, message string, fields ...Field) Info(ctx context.Context, message string, fields ...Field) Notice(ctx context.Context, message string, fields ...Field) Warn(ctx context.Context, message string, fields ...Field) Error(ctx context.Context, message string, fields ...Field) Fatal(ctx context.Context, message string, fields ...Field) }
type Config ¶ added in v0.4.0
type Config struct {
Env go_environment.Environment
}
type Field ¶
type Field string
Field to log
func FmtAny ¶
FmtAny using JSON marshaller with indenting
Use this to format for logging any object that can be JSON unmarshalled Type and value will be logged If JSON unmarshalling fails, the value will not be logged
func FmtAnys ¶
FmtAnys using JSON marshaller with indenting
Use this to format for logging any object that can be JSON unmarshalled Type and value will be logged If JSON unmarshalling fails, the value will not be logged
func FmtDuration ¶
FmtDuration as name/value pair for logging
func FmtDurations ¶
FmtDurations as name/[values] pair for logging
func FmtFloat32 ¶
FmtFloat32 as name/value pair for logging
func FmtFloat32s ¶
FmtFloat32s as name/[values] pair for logging
func FmtFloat64 ¶
FmtFloat64 as name/value pair for logging
func FmtFloat64s ¶
FmtFloat64s as name/[values] pair for logging
func FmtStrings ¶
FmtStrings as name/[values] pair for logging