Documentation
¶
Overview ¶
Package log0 is a JSON logging.
Index ¶
- Constants
- func Any(v interface{}) anyV
- func Anys(s ...interface{}) anyS
- func Bool(v bool) boolV
- func Boolp(p *bool) boolP
- func Boolps(s ...*bool) boolPS
- func Bools(s ...bool) boolS
- func Bytes(s ...byte) byteS
- func Bytesp(p *[]byte) byteSP
- func Bytesps(a ...*[]byte) byteSPS
- func Bytess(s ...[]byte) byteSS
- func Complex128(v complex128) complex128V
- func Complex128p(p *complex128) complex128P
- func Complex128ps(a ...*complex128) complex128PS
- func Complex128s(s ...complex128) complex128S
- func Complex64(v complex64) complex64V
- func Complex64p(p *complex64) complex64P
- func Complex64ps(s ...*complex64) complex64PS
- func Complex64s(s ...complex64) complex64S
- func Duration(v time.Duration) durationV
- func Durationp(p *time.Duration) durationP
- func Durationps(s ...*time.Duration) durationPS
- func Durations(s ...time.Duration) durationS
- func Error(v error) errorV
- func Errorp(p *error) errorP
- func Errorps(s ...*error) errorPS
- func Errors(s ...error) errorS
- func Float32(v float32) float32V
- func Float32p(p *float32) float32P
- func Float32ps(a ...*float32) float32PS
- func Float32s(s ...float32) float32S
- func Float64(v float64) float64V
- func Float64p(p *float64) float64P
- func Float64ps(a ...*float64) float64PS
- func Float64s(s ...float64) float64S
- func Func(v func() KV) funcV
- func Int(v int) intV
- func Int16(v int16) int16V
- func Int16p(p *int16) int16P
- func Int16ps(a ...*int16) int16PS
- func Int16s(s ...int16) int16S
- func Int32(v int32) int32V
- func Int32p(p *int32) int32P
- func Int32ps(a ...*int32) int32PS
- func Int32s(s ...int32) int32S
- func Int64(v int64) int64V
- func Int64p(p *int64) int64P
- func Int64ps(a ...*int64) int64PS
- func Int64s(s ...int64) int64S
- func Int8(v int8) int8V
- func Int8p(p *int8) int8P
- func Int8ps(a ...*int8) int8PS
- func Int8s(s ...int8) int8S
- func Intp(p *int) intP
- func Intps(a ...*int) intPS
- func Ints(s ...int) intS
- func JSON(s ...KV) jsonV
- func JSONMarshalers(s ...json.Marshaler) jsonMarshalerS
- func Raw(v []byte) rawV
- func Rawp(p *[]byte) rawP
- func Rawps(s ...*[]byte) rawPS
- func Raws(s ...[]byte) rawS
- func Reflect(v interface{}) reflectV
- func Reflects(s ...interface{}) reflectS
- func Runes(s ...rune) runeS
- func Runesp(p *[]rune) runeSP
- func Runesps(a ...*[]rune) runeSPS
- func String(v string) stringV
- func StringAny(k string, v interface{}) kvm
- func StringBool(k string, v bool) kvm
- func StringBoolp(k string, v *bool) kvm
- func StringBools(k string, v ...bool) kvm
- func StringBytes(k string, v ...byte) kvm
- func StringBytesp(k string, v *[]byte) kvm
- func StringBytess(k string, v ...[]byte) kvm
- func StringBytessp(k string, v ...*[]byte) kvm
- func StringComplex128(k string, v complex128) kvm
- func StringComplex128p(k string, v *complex128) kvm
- func StringComplex64(k string, v complex64) kvm
- func StringComplex64p(k string, v *complex64) kvm
- func StringDuration(k string, v time.Duration) kvm
- func StringDurationp(k string, v *time.Duration) kvm
- func StringError(k string, v error) kvm
- func StringErrors(k string, v ...error) kvm
- func StringFloat32(k string, v float32) kvm
- func StringFloat32p(k string, v *float32) kvm
- func StringFloat64(k string, v float64) kvm
- func StringFloat64p(k string, v *float64) kvm
- func StringFunc(k string, v func() KV) kvm
- func StringInt(k string, v int) kvm
- func StringInt16(k string, v int16) kvm
- func StringInt16p(k string, v *int16) kvm
- func StringInt32(k string, v int32) kvm
- func StringInt32p(k string, v *int32) kvm
- func StringInt64(k string, v int64) kvm
- func StringInt64p(k string, v *int64) kvm
- func StringInt8(k string, v int8) kvm
- func StringInt8p(k string, v *int8) kvm
- func StringIntp(k string, v *int) kvm
- func StringLevel(k string, v string) kvl
- func StringRaw(k string, v []byte) kvm
- func StringReflect(k string, v interface{}) kvm
- func StringRunes(k string, v ...rune) kvm
- func StringRunesp(k string, v *[]rune) kvm
- func StringString(k string, v string) kvm
- func StringStringp(k string, v *string) kvm
- func StringStrings(k string, v ...string) kvm
- func StringTime(k string, v time.Time) kvm
- func StringTimep(k string, v *time.Time) kvm
- func StringUint(k string, v uint) kvm
- func StringUint16(k string, v uint16) kvm
- func StringUint16p(k string, v *uint16) kvm
- func StringUint32(k string, v uint32) kvm
- func StringUint32p(k string, v *uint32) kvm
- func StringUint64(k string, v uint64) kvm
- func StringUint64p(k string, v *uint64) kvm
- func StringUint8(k string, v uint8) kvm
- func StringUint8p(k string, v *uint8) kvm
- func StringUintp(k string, v *uint) kvm
- func StringUintptr(k string, v uintptr) kvm
- func StringUintptrp(k string, v *uintptr) kvm
- func Stringp(p *string) stringP
- func Stringps(a ...*string) stringPS
- func Strings(s ...string) stringS
- func Text(v encoding.TextMarshaler) textV
- func TextAny(k encoding.TextMarshaler, v interface{}) kvm
- func TextBool(k encoding.TextMarshaler, v bool) kvm
- func TextBoolp(k encoding.TextMarshaler, v *bool) kvm
- func TextBytes(k encoding.TextMarshaler, v ...byte) kvm
- func TextBytesp(k encoding.TextMarshaler, v *[]byte) kvm
- func TextComplex128(k encoding.TextMarshaler, v complex128) kvm
- func TextComplex128p(k encoding.TextMarshaler, v *complex128) kvm
- func TextComplex64(k encoding.TextMarshaler, v complex64) kvm
- func TextComplex64p(k encoding.TextMarshaler, v *complex64) kvm
- func TextDuration(k encoding.TextMarshaler, v time.Duration) kvm
- func TextDurationp(k encoding.TextMarshaler, v *time.Duration) kvm
- func TextError(k encoding.TextMarshaler, v error) kvm
- func TextFloat32(k encoding.TextMarshaler, v float32) kvm
- func TextFloat32p(k encoding.TextMarshaler, v *float32) kvm
- func TextFloat64(k encoding.TextMarshaler, v float64) kvm
- func TextFloat64p(k encoding.TextMarshaler, v *float64) kvm
- func TextFunc(k encoding.TextMarshaler, v func() json.Marshaler) kvm
- func TextInt(k encoding.TextMarshaler, v int) kvm
- func TextInt16(k encoding.TextMarshaler, v int16) kvm
- func TextInt16p(k encoding.TextMarshaler, v *int16) kvm
- func TextInt32(k encoding.TextMarshaler, v int32) kvm
- func TextInt32p(k encoding.TextMarshaler, v *int32) kvm
- func TextInt64(k encoding.TextMarshaler, v int64) kvm
- func TextInt64p(k encoding.TextMarshaler, v *int64) kvm
- func TextInt8(k encoding.TextMarshaler, v int8) kvm
- func TextInt8p(k encoding.TextMarshaler, v *int8) kvm
- func TextIntp(k encoding.TextMarshaler, v *int) kvm
- func TextRaw(k encoding.TextMarshaler, v []byte) kvm
- func TextReflect(k encoding.TextMarshaler, v interface{}) kvm
- func TextRunes(k encoding.TextMarshaler, v ...rune) kvm
- func TextRunesp(k encoding.TextMarshaler, v *[]rune) kvm
- func TextString(k encoding.TextMarshaler, v string) kvm
- func TextStringp(k encoding.TextMarshaler, v *string) kvm
- func TextText(k, v encoding.TextMarshaler) kvm
- func TextTime(k encoding.TextMarshaler, v time.Time) kvm
- func TextTimep(k encoding.TextMarshaler, v *time.Time) kvm
- func TextUint(k encoding.TextMarshaler, v uint) kvm
- func TextUint16(k encoding.TextMarshaler, v uint16) kvm
- func TextUint16p(k encoding.TextMarshaler, v *uint16) kvm
- func TextUint32(k encoding.TextMarshaler, v uint32) kvm
- func TextUint32p(k encoding.TextMarshaler, v *uint32) kvm
- func TextUint64(k encoding.TextMarshaler, v uint64) kvm
- func TextUint64p(k encoding.TextMarshaler, v *uint64) kvm
- func TextUint8(k encoding.TextMarshaler, v uint8) kvm
- func TextUint8p(k encoding.TextMarshaler, v *uint8) kvm
- func TextUintp(k encoding.TextMarshaler, v *uint) kvm
- func TextUintptr(k encoding.TextMarshaler, v uintptr) kvm
- func TextUintptrp(k encoding.TextMarshaler, v *uintptr) kvm
- func Texts(s ...encoding.TextMarshaler) textS
- func Time(v time.Time) timeV
- func Timep(p *time.Time) timeP
- func Timeps(a ...*time.Time) timePS
- func Times(s ...time.Time) timeS
- func Uint(v uint) uintV
- func Uint16(v uint16) uint16V
- func Uint16p(p *uint16) uint16P
- func Uint16ps(a ...*uint16) uint16PS
- func Uint16s(s ...uint16) uint16S
- func Uint32(v uint32) uint32V
- func Uint32p(p *uint32) uint32P
- func Uint32ps(a ...*uint32) uint32PS
- func Uint32s(s ...uint32) uint32S
- func Uint64(v uint64) uint64V
- func Uint64p(p *uint64) uint64P
- func Uint64ps(a ...*uint64) uint64PS
- func Uint64s(s ...uint64) uint64S
- func Uint8(v uint8) uint8V
- func Uint8p(p *uint8) uint8P
- func Uint8ps(a ...*uint8) uint8PS
- func Uint8s(s ...uint8) uint8S
- func Uintp(p *uint) uintP
- func Uintps(a ...*uint) uintPS
- func Uintptr(v uintptr) uintptrV
- func Uintptrp(p *uintptr) uintptrP
- func Uintptrps(a ...*uintptr) uintptrPS
- func Uintptrs(s ...uintptr) uintptrS
- func Uints(s ...uint) uintS
- type Encoder
- type KV
- type KeyValuer
- type Leveler
- type Log
- type Logger
Constants ¶
const ( Original = iota Excerpt Trail File )
const ( Trunc = iota Empty Blank )
Variables ¶
This section is empty.
Functions ¶
func Anys ¶ added in v0.137.0
func Anys(s ...interface{}) anyS
Anys returns stringer/JSON/text marshaler for the slice of any type.
func Boolp ¶
func Boolp(p *bool) boolP
Boolp returns stringer/JSON/text marshaler for the bool pointer type.
func Boolps ¶ added in v0.141.0
func Boolps(s ...*bool) boolPS
Boolps returns stringer/JSON/text marshaler for slice of bool pointers type.
func Bools ¶ added in v0.137.0
func Bools(s ...bool) boolS
Bools returns stringer/JSON/text marshaler for the bool slice type.
func Bytes ¶
func Bytes(s ...byte) byteS
Bytes returns stringer/JSON/text marshaler for slice of bytes type.
func Bytesp ¶
func Bytesp(p *[]byte) byteSP
Bytesp returns stringer/JSON/text marshaler for the pointer to byte slice type.
func Bytesps ¶ added in v0.141.0
func Bytesps(a ...*[]byte) byteSPS
Bytesps returns stringer/JSON/text marshaler for slice of pointers to byte slice type.
func Bytess ¶ added in v0.137.0
func Bytess(s ...[]byte) byteSS
Bytess returns stringer/JSON/text marshaler for the slice of byte slice type.
func Complex128 ¶
func Complex128(v complex128) complex128V
Complex128 returns stringer/JSON/text marshaler for the complex128 type.
func Complex128p ¶
func Complex128p(p *complex128) complex128P
Complex128p returns stringer/JSON/text marshaler for the complex128 pointer type.
func Complex128ps ¶ added in v0.143.0
func Complex128ps(a ...*complex128) complex128PS
Complex128ps returns stringer/JSON/text marshaler for the complex128 pointer slice type.
func Complex128s ¶ added in v0.137.0
func Complex128s(s ...complex128) complex128S
Complex128s returns stringer/JSON/text marshaler for the complex128 slice type.
func Complex64 ¶
func Complex64(v complex64) complex64V
Complex64 returns stringer/JSON/text marshaler for the complex64 type.
func Complex64p ¶
func Complex64p(p *complex64) complex64P
Complex64p returns stringer/JSON/text marshaler for the complex64 pointer type.
func Complex64ps ¶ added in v0.141.0
func Complex64ps(s ...*complex64) complex64PS
Complex64ps returns stringer/JSON/text marshaler for the slice of complex64 pointers type.
func Complex64s ¶ added in v0.139.0
func Complex64s(s ...complex64) complex64S
Complex64s returns stringer/JSON/text marshaler for the complex64 type.
func Durationps ¶ added in v0.141.0
Durationps returns stringer/JSON/text marshaler for the time duration pointer slice type.
func Durations ¶ added in v0.139.0
Durations returns stringer/JSON/text marshaler for time duration slice type.
func Error ¶
func Error(v error) errorV
Error returns stringer/JSON/text marshaler for the error type.
func Errorp ¶ added in v0.139.0
func Errorp(p *error) errorP
Errorp returns stringer/JSON/text marshaler for the error pointer type.
func Errorps ¶ added in v0.143.0
func Errorps(s ...*error) errorPS
Errorps returns stringer/JSON/text marshaler for the slice of error pointers type.
func Errors ¶ added in v0.137.0
func Errors(s ...error) errorS
Errors returns stringer/JSON/text marshaler for the error slice type.
func Float32 ¶
func Float32(v float32) float32V
Float32 returns stringer/JSON/text marshaler for the float32 type.
func Float32p ¶
func Float32p(p *float32) float32P
Float32p returns stringer/JSON/text marshaler for the float32 pointer type.
func Float32ps ¶ added in v0.145.0
func Float32ps(a ...*float32) float32PS
Float32ps returns stringer/JSON/text marshaler for the float32 pointer slice type.
func Float32s ¶ added in v0.143.0
func Float32s(s ...float32) float32S
Float32s returns stringer/JSON/text marshaler for the float32 slice type.
func Float64 ¶
func Float64(v float64) float64V
Float64 returns stringer/JSON/text marshaler for the float64 type.
func Float64p ¶
func Float64p(p *float64) float64P
Float64p returns stringer/JSON/text marshaler for the float64 pointer type.
func Float64ps ¶ added in v0.149.0
func Float64ps(a ...*float64) float64PS
Float64ps returns stringer/JSON/text marshaler for the float64 pointer slice type.
func Float64s ¶ added in v0.149.0
func Float64s(s ...float64) float64S
Float64s returns stringer/JSON/text marshaler for the float64 slice type.
func Func ¶
func Func(v func() KV) funcV
Func returns stringer/JSON/text marshaler for the custom function type.
func Int16 ¶
func Int16(v int16) int16V
Int16 returns stringer/JSON/text marshaler for the int16 type.
func Int16p ¶
func Int16p(p *int16) int16P
Int16p returns stringer/JSON/text marshaler for the int16 pointer type.
func Int16ps ¶ added in v0.149.0
func Int16ps(a ...*int16) int16PS
Int16ps returns stringer/JSON/text marshaler for the int16 pointer slice type.
func Int16s ¶ added in v0.149.0
func Int16s(s ...int16) int16S
Int16s returns stringer/JSON/text marshaler for the int16 slice type.
func Int32 ¶
func Int32(v int32) int32V
Int32 returns stringer/JSON/text marshaler for the int32 type.
func Int32p ¶
func Int32p(p *int32) int32P
Int32p returns stringer/JSON/text marshaler for the int32 pointer type.
func Int32ps ¶ added in v0.149.0
func Int32ps(a ...*int32) int32PS
Int32ps returns stringer/JSON/text marshaler for the int32 pointer slice type.
func Int32s ¶ added in v0.149.0
func Int32s(s ...int32) int32S
Int32s returns stringer/JSON/text marshaler for the int32 slice type.
func Int64 ¶
func Int64(v int64) int64V
Int64 returns stringer/JSON/text marshaler for the int64 type.
func Int64p ¶
func Int64p(p *int64) int64P
Int64p returns stringer/JSON/text marshaler for the int64 pointer type.
func Int64ps ¶ added in v0.149.0
func Int64ps(a ...*int64) int64PS
Int64ps returns stringer/JSON/text marshaler for the int64 pointer slice type.
func Int64s ¶ added in v0.149.0
func Int64s(s ...int64) int64S
Int64s returns stringer/JSON/text marshaler for the int64 slice type.
func Int8p ¶
func Int8p(p *int8) int8P
Int8p returns stringer/JSON/text marshaler for the int8 pointer type.
func Int8ps ¶ added in v0.149.0
func Int8ps(a ...*int8) int8PS
Int8ps returns stringer/JSON/text marshaler for the int8 pointer slice type.
func Int8s ¶ added in v0.149.0
func Int8s(s ...int8) int8S
Int8s returns stringer/JSON/text marshaler for the int8 slice type.
func Intp ¶
func Intp(p *int) intP
Intp returns stringer/JSON/text marshaler for the int pointer type.
func Intps ¶ added in v0.149.0
func Intps(a ...*int) intPS
Intps returns stringer/JSON/text marshaler for the int pointer slice type.
func Ints ¶ added in v0.149.0
func Ints(s ...int) intS
Ints returns stringer/JSON/text marshaler for the int slice type.
func JSON ¶ added in v0.171.0
func JSON(s ...KV) jsonV
JSON returns stringer/JSON/text marshaler for the KV slice type.
func JSONMarshalers ¶ added in v0.169.0
JSONMarshalers returns stringer/JSON/text marshaler for the JSON marshaler slice type.
func Rawp ¶ added in v0.153.0
func Rawp(p *[]byte) rawP
Rawp returns stringer/JSON/text marshaler for the raw byte slice pointer.
func Rawps ¶ added in v0.153.0
func Rawps(s ...*[]byte) rawPS
Rawps returns stringer/JSON/text marshaler for the slice of byte slice pointers type.
func Raws ¶ added in v0.151.0
func Raws(s ...[]byte) rawS
Raws returns stringer/JSON/text marshaler for the slice of byte slice type.
func Runes ¶
func Runes(s ...rune) runeS
Runes returns stringer/JSON/text marshaler for the rune slice type.
func Runesp ¶
func Runesp(p *[]rune) runeSP
Runesp returns stringer/JSON/text marshaler for the rune pointer slice type.
func Runesps ¶ added in v0.153.0
func Runesps(a ...*[]rune) runeSPS
Runesps returns stringer/JSON/text marshaler for slice of pointers to rune slice type.
func String ¶
func String(v string) stringV
String returns stringer/JSON/text marshaler for the string type.
func StringBool ¶
func StringBoolp ¶
func StringBools ¶ added in v0.137.0
func StringBytes ¶
func StringBytesp ¶
func StringBytess ¶ added in v0.137.0
func StringBytessp ¶ added in v0.137.0
func StringComplex128 ¶
func StringComplex128(k string, v complex128) kvm
func StringComplex128p ¶
func StringComplex128p(k string, v *complex128) kvm
func StringComplex64 ¶
func StringComplex64p ¶
func StringDuration ¶
func StringDurationp ¶
func StringError ¶
func StringErrors ¶ added in v0.137.0
func StringFloat32 ¶
func StringFloat32p ¶
func StringFloat64 ¶
func StringFloat64p ¶
func StringFunc ¶
func StringInt16 ¶
func StringInt16p ¶
func StringInt32 ¶
func StringInt32p ¶
func StringInt64 ¶
func StringInt64p ¶
func StringInt8 ¶
func StringInt8p ¶
func StringIntp ¶
func StringLevel ¶ added in v0.126.0
func StringReflect ¶
func StringReflect(k string, v interface{}) kvm
func StringRunes ¶
func StringRunesp ¶
func StringString ¶ added in v0.135.0
func StringStringp ¶
func StringStrings ¶ added in v0.137.0
func StringTime ¶
func StringTimep ¶
func StringUint ¶
func StringUint16 ¶
func StringUint16p ¶
func StringUint32 ¶
func StringUint32p ¶
func StringUint64 ¶
func StringUint64p ¶
func StringUint8 ¶
func StringUint8p ¶
func StringUintp ¶
func StringUintptr ¶
func StringUintptrp ¶
func Stringp ¶
func Stringp(p *string) stringP
Stringp returns stringer/JSON/text marshaler for the string pointer type.
func Stringps ¶ added in v0.163.0
func Stringps(a ...*string) stringPS
Stringps returns stringer/JSON/text marshaler for the string pointer slice type.
func Strings ¶
func Strings(s ...string) stringS
Strings returns stringer/JSON/text marshaler for the string slice type.
func Text ¶
func Text(v encoding.TextMarshaler) textV
Text returns stringer/JSON/text marshaler for the encoding.TextMarshaler type.
func TextAny ¶
func TextAny(k encoding.TextMarshaler, v interface{}) kvm
func TextBool ¶
func TextBool(k encoding.TextMarshaler, v bool) kvm
func TextBoolp ¶
func TextBoolp(k encoding.TextMarshaler, v *bool) kvm
func TextBytes ¶
func TextBytes(k encoding.TextMarshaler, v ...byte) kvm
func TextBytesp ¶
func TextBytesp(k encoding.TextMarshaler, v *[]byte) kvm
func TextComplex128 ¶
func TextComplex128(k encoding.TextMarshaler, v complex128) kvm
func TextComplex128p ¶
func TextComplex128p(k encoding.TextMarshaler, v *complex128) kvm
func TextComplex64 ¶
func TextComplex64(k encoding.TextMarshaler, v complex64) kvm
func TextComplex64p ¶
func TextComplex64p(k encoding.TextMarshaler, v *complex64) kvm
func TextDuration ¶
func TextDuration(k encoding.TextMarshaler, v time.Duration) kvm
func TextDurationp ¶
func TextDurationp(k encoding.TextMarshaler, v *time.Duration) kvm
func TextError ¶
func TextError(k encoding.TextMarshaler, v error) kvm
func TextFloat32 ¶
func TextFloat32(k encoding.TextMarshaler, v float32) kvm
func TextFloat32p ¶
func TextFloat32p(k encoding.TextMarshaler, v *float32) kvm
func TextFloat64 ¶
func TextFloat64(k encoding.TextMarshaler, v float64) kvm
func TextFloat64p ¶
func TextFloat64p(k encoding.TextMarshaler, v *float64) kvm
func TextInt ¶
func TextInt(k encoding.TextMarshaler, v int) kvm
func TextInt16 ¶
func TextInt16(k encoding.TextMarshaler, v int16) kvm
func TextInt16p ¶
func TextInt16p(k encoding.TextMarshaler, v *int16) kvm
func TextInt32 ¶
func TextInt32(k encoding.TextMarshaler, v int32) kvm
func TextInt32p ¶
func TextInt32p(k encoding.TextMarshaler, v *int32) kvm
func TextInt64 ¶
func TextInt64(k encoding.TextMarshaler, v int64) kvm
func TextInt64p ¶
func TextInt64p(k encoding.TextMarshaler, v *int64) kvm
func TextInt8 ¶
func TextInt8(k encoding.TextMarshaler, v int8) kvm
func TextInt8p ¶
func TextInt8p(k encoding.TextMarshaler, v *int8) kvm
func TextIntp ¶
func TextIntp(k encoding.TextMarshaler, v *int) kvm
func TextRaw ¶
func TextRaw(k encoding.TextMarshaler, v []byte) kvm
func TextReflect ¶
func TextReflect(k encoding.TextMarshaler, v interface{}) kvm
func TextRunes ¶
func TextRunes(k encoding.TextMarshaler, v ...rune) kvm
func TextRunesp ¶
func TextRunesp(k encoding.TextMarshaler, v *[]rune) kvm
func TextString ¶
func TextString(k encoding.TextMarshaler, v string) kvm
func TextStringp ¶
func TextStringp(k encoding.TextMarshaler, v *string) kvm
func TextText ¶ added in v0.155.0
func TextText(k, v encoding.TextMarshaler) kvm
func TextUint ¶
func TextUint(k encoding.TextMarshaler, v uint) kvm
func TextUint16 ¶
func TextUint16(k encoding.TextMarshaler, v uint16) kvm
func TextUint16p ¶
func TextUint16p(k encoding.TextMarshaler, v *uint16) kvm
func TextUint32 ¶
func TextUint32(k encoding.TextMarshaler, v uint32) kvm
func TextUint32p ¶
func TextUint32p(k encoding.TextMarshaler, v *uint32) kvm
func TextUint64 ¶
func TextUint64(k encoding.TextMarshaler, v uint64) kvm
func TextUint64p ¶
func TextUint64p(k encoding.TextMarshaler, v *uint64) kvm
func TextUint8 ¶
func TextUint8(k encoding.TextMarshaler, v uint8) kvm
func TextUint8p ¶
func TextUint8p(k encoding.TextMarshaler, v *uint8) kvm
func TextUintp ¶
func TextUintp(k encoding.TextMarshaler, v *uint) kvm
func TextUintptr ¶
func TextUintptr(k encoding.TextMarshaler, v uintptr) kvm
func TextUintptrp ¶
func TextUintptrp(k encoding.TextMarshaler, v *uintptr) kvm
func Texts ¶
func Texts(s ...encoding.TextMarshaler) textS
Texts returns stringer/JSON/text marshaler for the text marshaler slice type.
func Timeps ¶ added in v0.159.0
Timeps returns stringer/JSON/text marshaler for the time pointer slice type.
func Times ¶ added in v0.159.0
Times returns stringer/JSON/text marshaler for the slice of byte slice type.
func Uint16 ¶
func Uint16(v uint16) uint16V
Uint16 returns stringer/JSON/text marshaler for the uint16 type.
func Uint16p ¶
func Uint16p(p *uint16) uint16P
Uint16p returns stringer/JSON/text marshaler for the uint16 pointer type.
func Uint16ps ¶ added in v0.159.0
func Uint16ps(a ...*uint16) uint16PS
Uint16ps returns stringer/JSON/text marshaler for the uint16 pointer slice type.
func Uint16s ¶ added in v0.159.0
func Uint16s(s ...uint16) uint16S
Uint16s returns stringer/JSON/text marshaler for the uint16 slice type.
func Uint32 ¶
func Uint32(v uint32) uint32V
Uint32 returns stringer/JSON/text marshaler for the uint32 type.
func Uint32p ¶
func Uint32p(p *uint32) uint32P
Uint32p returns stringer/JSON/text marshaler for the uint32 pointer type.
func Uint32ps ¶ added in v0.159.0
func Uint32ps(a ...*uint32) uint32PS
Uint32ps returns stringer/JSON/text marshaler for the uint32 pointer slice type.
func Uint32s ¶ added in v0.159.0
func Uint32s(s ...uint32) uint32S
Uint32s returns stringer/JSON/text marshaler for the uint32 slice type.
func Uint64 ¶
func Uint64(v uint64) uint64V
Uint64 returns stringer/JSON/text marshaler for the uint64 type.
func Uint64p ¶
func Uint64p(p *uint64) uint64P
Uint64p returns stringer/JSON/text marshaler for the uint64 pointer type.
func Uint64ps ¶ added in v0.159.0
func Uint64ps(a ...*uint64) uint64PS
Uint64ps returns stringer/JSON/text marshaler for the uint64 pointer slice type.
func Uint64s ¶ added in v0.159.0
func Uint64s(s ...uint64) uint64S
Uint64s returns stringer/JSON/text marshaler for the uint64 slice type.
func Uint8 ¶
func Uint8(v uint8) uint8V
Uint8 returns stringer/JSON/text marshaler for the uint8 type.
func Uint8p ¶
func Uint8p(p *uint8) uint8P
Uint8p returns stringer/JSON/text marshaler for the uint8 pointer type.
func Uint8ps ¶ added in v0.159.0
func Uint8ps(a ...*uint8) uint8PS
Uint8ps returns stringer/JSON/text marshaler for the uint8 pointer slice type.
func Uint8s ¶ added in v0.159.0
func Uint8s(s ...uint8) uint8S
Uint8s returns stringer/JSON/text marshaler for the uint8 slice type.
func Uintp ¶
func Uintp(p *uint) uintP
Uintp returns stringer/JSON/text marshaler for the uint pointer type.
func Uintps ¶ added in v0.159.0
func Uintps(a ...*uint) uintPS
Uintps returns stringer/JSON/text marshaler for the uint pointer slice type.
func Uintptr ¶
func Uintptr(v uintptr) uintptrV
Uintptr returns stringer/JSON/text marshaler for the uintptr type.
func Uintptrp ¶
func Uintptrp(p *uintptr) uintptrP
Uintptrp returns stringer/JSON/text marshaler for the uintptr pointer type.
func Uintptrps ¶ added in v0.159.0
func Uintptrps(a ...*uintptr) uintptrPS
Uintptrps returns stringer/JSON/text marshaler for the slice of a pointer to a uintptr type.
Types ¶
type KeyValuer ¶ added in v0.165.0
type KeyValuer interface {
KeyValues() []KV
}
KeyValuer provides key-values slice.
type Leveler ¶ added in v0.126.0
type Leveler interface {
Level() string
}
Leveler provides severity level.
type Log ¶
type Log struct { Output io.Writer // Output is a destination for output. Flag int // Flag is a log properties. KV []KV // KV is a key-values. Level func(level string) (output io.Writer) // Level function receives severity level and returns a output writer for a severity level. Keys [4]encoding.TextMarshaler // Keys: 0 = original message; 1 = message excerpt; 2 = message trail; 3 = file path. Key uint8 // Key is a default/sticky message key: all except 1 = original message; 1 = message excerpt. Trunc int // Trunc is a maximum length of an excerpt, after which it is truncated. Marks [3][]byte // Marks: 0 = truncate; 1 = empty; 2 = blank. Replace [][2][]byte // Replace ia a pairs of byte slices to replace in the message excerpt. }
Log is a JSON logger/writer.
func GELF ¶
func GELF() *Log
GELF returns a GELF formater <https://docs.graylog.org/en/latest/pages/gelf.html>.
func (*Log) Get ¶ added in v0.114.0
Get returns copy of the logger with additional key-values. If first key-value pair implements the Leveler interface and the Level field of the Log is not null then calls the function from Level field with the severity level as argument which obtained from Leveler interface. Then the function from Level field returns writer for output of the logger. Copy of the original key-values has the priority lower than the priority of the newer key-values.
Source Files
¶
- any.go
- anys.go
- bool.go
- boolp.go
- boolps.go
- bools.go
- bytes.go
- bytesp.go
- bytesps.go
- bytess.go
- complex128.go
- complex128p.go
- complex128ps.go
- complex128s.go
- complex64.go
- complex64p.go
- complex64ps.go
- complex64s.go
- duration.go
- durationp.go
- durationps.go
- durations.go
- error.go
- errorp.go
- errorps.go
- errors.go
- float32.go
- float32p.go
- float32ps.go
- float32s.go
- float64.go
- float64p.go
- float64ps.go
- float64s.go
- func.go
- int.go
- int16.go
- int16p.go
- int16ps.go
- int16s.go
- int32.go
- int32p.go
- int32ps.go
- int32s.go
- int64.go
- int64p.go
- int64ps.go
- int64s.go
- int8.go
- int8p.go
- int8ps.go
- int8s.go
- intp.go
- intps.go
- ints.go
- json.go
- json_marshalers.go
- kv0.go
- log0.go
- raw.go
- rawp.go
- rawps.go
- raws.go
- reflect.go
- reflects.go
- runes.go
- runesp.go
- runesps.go
- string.go
- stringp.go
- stringps.go
- strings.go
- text.go
- texts.go
- time.go
- timep.go
- timeps.go
- times.go
- uint.go
- uint16.go
- uint16p.go
- uint16ps.go
- uint16s.go
- uint32.go
- uint32p.go
- uint32ps.go
- uint32s.go
- uint64.go
- uint64p.go
- uint64ps.go
- uint64s.go
- uint8.go
- uint8p.go
- uint8ps.go
- uint8s.go
- uintp.go
- uintps.go
- uintptr.go
- uintptrp.go
- uintptrps.go
- uintptrs.go
- uints.go