dlog

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

* File: prop.go * Date: Wednesday, 14th August 2024 9:12:10 PM * Author: Hy Nguyen * Copyright - 2024, HYSOFTWARE LLC

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnErr

func AnErr(key string, val error) log.Prop

AnErr creates a property setter for key/value pair of an error

func Bytes

func Bytes(key string, val []byte) log.Prop

Bytes creates a property setter for key/value pair of bytes

func Dur

func Dur(key string, val time.Duration) log.Prop

Dur creates a property setter for key/value pair of a duration

func Durs

func Durs(key string, val []time.Duration) log.Prop

Durs creates a property setter for key/value pair of multi duration

func Errs

func Errs(key string, val []error) log.Prop

Errs creates a property setter for key/value pair of multi errors

func Float32

func Float32(key string, val float32) log.Prop

Float32 creates a property setter for key/value pair of a float32

func Float32s

func Float32s(key string, val []float32) log.Prop

Float32s creates a property setter for key/value pair of multi float32s

func Float64

func Float64(key string, val float64) log.Prop

Float64 creates a property setter for key/value pair of a float64

func Float64s

func Float64s(key string, val []float64) log.Prop

Float64s creates a property setter for key/value pair of multi float64s

func FromContext

func FromContext(ctx context.Context) log.ILogger

FromContext extract the log.ILogger stored in a given context.Context If none was stored, it'll return a "disabled" log.ILogger

func GetRootLevel

func GetRootLevel() log.Level

GetRootLevel get the current default level of the root logger

func GetRootTimeStampEnabled

func GetRootTimeStampEnabled() bool

GetRootTimeStampEnabled gets the flag that enables/disables the timestamp field of the root logger

func Hex

func Hex(key string, val []byte) log.Prop

Hex creates a property setter for key/value pair of hex data

func Int

func Int(key string, val int) log.Prop

Int creates a property setter for key/value pair of an int

func Int8

func Int8(key string, val int8) log.Prop

Int8 creates a property setter for key/value pair of an int9

func Int8s

func Int8s(key string, val []int8) log.Prop

Int8s creates a property setter for key/value pair of multi int8s

func Int16

func Int16(key string, val int16) log.Prop

Int16 creates a property setter for key/value pair of an int16

func Int16s

func Int16s(key string, val []int16) log.Prop

Int16s creates a property setter for key/value pair of multi int16s

func Int32

func Int32(key string, val int32) log.Prop

Int32 creates a property setter for key/value pair of int32

func Int32s

func Int32s(key string, val []int32) log.Prop

Int32s creates a property setter for key/value pair of multi int32s

func Int64

func Int64(key string, val int64) log.Prop

Int64 creates a property setter for key/value pair of an int64

func Int64s

func Int64s(key string, val []int64) log.Prop

Int64s creates a property setter for key/value pair of multi int64s

func Ints

func Ints(key string, val []int) log.Prop

Ints creates a property setter for key/value pair of multi ints

func NewLogger

func NewLogger(w io.Writer) log.ILogger

NewLogger creates a new Logger with a default provider root level

func RawJSON

func RawJSON(key string, val []byte) log.Prop

RawJSON creates a property setter for key/value pair of raw JSON data

func SetRootLevel

func SetRootLevel(l log.Level)

SetRootLevel sets the default level of the root logger

func SetRootTimeStampEnabled

func SetRootTimeStampEnabled(f bool)

SetRootTimeStampEnabled enables/disables the timestamp field of the root logger

func Str

func Str(key string, val string) log.Prop

Str creates a property setter for key/value pair of a string

func Strs

func Strs(key string, val []string) log.Prop

Strs creates a property setter for key/value pair of

func UInt

func UInt(key string, val uint) log.Prop

UInt creates a property setter for key/value pair of an uint

func UInt8

func UInt8(key string, val uint8) log.Prop

UInt8 creates a property setter for key/value pair of an uint8

func UInt8s

func UInt8s(key string, val []uint8) log.Prop

UInt8s creates a property setter for key/value pair of multi uint8s

func UInt16

func UInt16(key string, val uint16) log.Prop

UInt16 creates a property setter for key/value pair of an uint16

func UInt16s

func UInt16s(key string, val []uint16) log.Prop

UInt16s creates a property setter for key/value pair of multi uint16s

func UInt32

func UInt32(key string, val uint32) log.Prop

UInt32 creates a property setter for key/value pair of an uint32

func UInt32s

func UInt32s(key string, val []uint32) log.Prop

UInt32s creates a property setter for key/value pair of multi uint32s

func UInt64

func UInt64(key string, val uint64) log.Prop

UInt64 creates a property setter for key/value pair of an uint64

func UInt64s

func UInt64s(key string, val []uint64) log.Prop

UInt64s creates a property setter for key/value pair of multi uint64s

func UInts

func UInts(key string, val []uint) log.Prop

UInts creates a property setter for key/value pair of multi uints

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL