Documentation
¶
Index ¶
- Variables
- func Fatal(args ...any)
- func Fatalf(format string, v ...any)
- func GlobalColoring(enable bool)
- func GlobalHook(hook func(Event))
- func GlobalStackInfo(enable bool)
- func GlobalTimestamp(enable bool)
- func GlobalTracing(enable bool)
- func GlobalVerbosity(enable bool)
- func ObjectInfo(args ...any)
- func Panic(args ...any)
- func Panicf(format string, v ...any)
- type Event
- func AccessToken(args ...any) Event
- func AccessTokenf(format string, v ...any) Event
- func Aconstructor(args ...any) Event
- func AconstructorError(args ...any) Event
- func AconstructorErrorf(format string, v ...any) Event
- func Aconstructorf(format string, v ...any) Event
- func ArrowDown(args ...any) Event
- func ArrowDownf(format string, v ...any) Event
- func ArrowIn(args ...any) Event
- func ArrowInf(format string, v ...any) Event
- func ArrowOut(args ...any) Event
- func ArrowOutf(format string, v ...any) Event
- func ArrowUp(args ...any) Event
- func ArrowUpf(format string, v ...any) Event
- func Bad(args ...any) Event
- func BadError(args ...any) Event
- func BadErrorf(format string, v ...any) Event
- func Badf(format string, v ...any) Event
- func Build(args ...any) Event
- func BuildError(args ...any) Event
- func BuildErrorf(format string, v ...any) Event
- func Buildf(format string, v ...any) Event
- func Check(args ...any) Event
- func Checkf(format string, v ...any) Event
- func Data(args ...any) Event
- func DataError(args ...any) Event
- func DataErrorf(format string, v ...any) Event
- func Dataf(format string, v ...any) Event
- func Debug(args ...any) Event
- func Debugf(format string, v ...any) Event
- func Decrypt(args ...any) Event
- func DecryptError(args ...any) Event
- func DecryptErrorf(format string, v ...any) Event
- func Decryptf(format string, v ...any) Event
- func Delete(args ...any) Event
- func DeleteError(args ...any) Event
- func DeleteErrorf(format string, v ...any) Event
- func Deletef(format string, v ...any) Event
- func Down(args ...any) Event
- func DownError(args ...any) Event
- func DownErrorf(format string, v ...any) Event
- func Downf(format string, v ...any) Event
- func Encrypt(args ...any) Event
- func EncryptError(args ...any) Event
- func EncryptErrorf(format string, v ...any) Event
- func Encryptf(format string, v ...any) Event
- func Error(args ...any) Event
- func Errorf(format string, v ...any) Event
- func Found(args ...any) Event
- func Foundf(format string, v ...any) Event
- func Function(args ...any) Event
- func FunctionError(args ...any) Event
- func FunctionErrorf(format string, v ...any) Event
- func Functionf(format string, v ...any) Event
- func Good(args ...any) Event
- func Goodf(format string, v ...any) Event
- func In(args ...any) Event
- func InError(args ...any) Event
- func InErrorf(format string, v ...any) Event
- func Inf(format string, v ...any) Event
- func Info(args ...any) Event
- func Infof(format string, v ...any) Event
- func Init(args ...any) Event
- func InitError(args ...any) Event
- func InitErrorf(format string, v ...any) Event
- func Initf(format string, v ...any) Event
- func Input(args ...any) Event
- func InputError(args ...any) Event
- func InputErrorf(format string, v ...any) Event
- func Inputf(format string, v ...any) Event
- func Key(args ...any) Event
- func KeyError(args ...any) Event
- func KeyErrorf(format string, v ...any) Event
- func Keyf(format string, v ...any) Event
- func Line(args ...any) Event
- func LineError(args ...any) Event
- func LineErrorf(format string, v ...any) Event
- func Linef(format string, v ...any) Event
- func NotFound(args ...any) Event
- func NotFoundf(format string, v ...any) Event
- func Ok(args ...any) Event
- func Okf(format string, v ...any) Event
- func Out(args ...any) Event
- func OutError(args ...any) Event
- func OutErrorf(format string, v ...any) Event
- func Outf(format string, v ...any) Event
- func Output(args ...any) Event
- func OutputError(args ...any) Event
- func OutputErrorf(format string, v ...any) Event
- func Outputf(format string, v ...any) Event
- func Param(args ...any) Event
- func ParamError(args ...any) Event
- func ParamErrorf(format string, v ...any) Event
- func Paramf(format string, v ...any) Event
- func Print(args ...any) Event
- func Printf(format string, v ...any) Event
- func Query(args ...any) Event
- func QueryError(args ...any) Event
- func QueryErrorf(format string, v ...any) Event
- func Queryf(format string, v ...any) Event
- func RefreshToken(args ...any) Event
- func RefreshTokenf(format string, v ...any) Event
- func RequestGet(args ...any) Event
- func RequestGetError(args ...any) Event
- func RequestGetErrorf(format string, v ...any) Event
- func RequestGetf(format string, v ...any) Event
- func RequestPost(args ...any) Event
- func RequestPostError(args ...any) Event
- func RequestPostErrorf(format string, v ...any) Event
- func RequestPostf(format string, v ...any) Event
- func Result(args ...any) Event
- func Resultf(format string, v ...any) Event
- func Save(args ...any) Event
- func SaveError(args ...any) Event
- func SaveErrorf(format string, v ...any) Event
- func Savef(format string, v ...any) Event
- func Security(args ...any) Event
- func SecurityError(args ...any) Event
- func SecurityErrorf(format string, v ...any) Event
- func Securityf(format string, v ...any) Event
- func SmallArrowDown(args ...any) Event
- func SmallArrowDownf(format string, v ...any) Event
- func SmallArrowIn(args ...any) Event
- func SmallArrowInf(format string, v ...any) Event
- func SmallArrowOut(args ...any) Event
- func SmallArrowOutf(format string, v ...any) Event
- func SmallArrowUp(args ...any) Event
- func SmallArrowUpf(format string, v ...any) Event
- func Start(args ...any) Event
- func StartError(args ...any) Event
- func StartErrorf(format string, v ...any) Event
- func Startf(format string, v ...any) Event
- func State(args ...any) Event
- func StateError(args ...any) Event
- func StateErrorf(format string, v ...any) Event
- func Statef(format string, v ...any) Event
- func Stop(args ...any) Event
- func StopError(args ...any) Event
- func StopErrorf(format string, v ...any) Event
- func Stopf(format string, v ...any) Event
- func Time(args ...any) Event
- func TimeError(args ...any) Event
- func TimeErrorf(format string, v ...any) Event
- func Timef(format string, v ...any) Event
- func Trace(args ...any) Event
- func Tracef(format string, v ...any) Event
- func Transmit(args ...any) Event
- func TransmitError(args ...any) Event
- func TransmitErrorf(format string, v ...any) Event
- func Transmitf(format string, v ...any) Event
- func Up(args ...any) Event
- func UpError(args ...any) Event
- func UpErrorf(format string, v ...any) Event
- func Update(args ...any) Event
- func UpdateError(args ...any) Event
- func UpdateErrorf(format string, v ...any) Event
- func Updatef(format string, v ...any) Event
- func Upf(format string, v ...any) Event
- func Warn(args ...any) Event
- func Warnf(format string, v ...any) Event
- func Warning(args ...any) Event
- func Warningf(format string, v ...any) Event
- type ParamType
- type Zone
- func (zone Zone) AccessToken(args ...any) Event
- func (zone Zone) AccessTokenf(format string, v ...any) Event
- func (zone Zone) Aconstructor(args ...any) Event
- func (zone Zone) AconstructorError(args ...any) Event
- func (zone Zone) AconstructorErrorf(format string, v ...any) Event
- func (zone Zone) Aconstructorf(format string, v ...any) Event
- func (zone Zone) ArrowDown(args ...any) Event
- func (zone Zone) ArrowDownf(format string, v ...any) Event
- func (zone Zone) ArrowIn(args ...any) Event
- func (zone Zone) ArrowInf(format string, v ...any) Event
- func (zone Zone) ArrowOut(args ...any) Event
- func (zone Zone) ArrowOutf(format string, v ...any) Event
- func (zone Zone) ArrowUp(args ...any) Event
- func (zone Zone) ArrowUpf(format string, v ...any) Event
- func (zone Zone) Bad(args ...any) Event
- func (zone Zone) BadError(args ...any) Event
- func (zone Zone) BadErrorf(format string, v ...any) Event
- func (zone Zone) Badf(format string, v ...any) Event
- func (zone Zone) Build(args ...any) Event
- func (zone Zone) BuildError(args ...any) Event
- func (zone Zone) BuildErrorf(format string, v ...any) Event
- func (zone Zone) Buildf(format string, v ...any) Event
- func (zone Zone) Check(args ...any) Event
- func (zone Zone) Checkf(format string, v ...any) Event
- func (zone Zone) Data(args ...any) Event
- func (zone Zone) DataError(args ...any) Event
- func (zone Zone) DataErrorf(format string, v ...any) Event
- func (zone Zone) Dataf(format string, v ...any) Event
- func (zone Zone) Debug(args ...any) Event
- func (zone Zone) Debugf(format string, v ...any) Event
- func (zone Zone) Decrypt(args ...any) Event
- func (zone Zone) DecryptError(args ...any) Event
- func (zone Zone) DecryptErrorf(format string, v ...any) Event
- func (zone Zone) Decryptf(format string, v ...any) Event
- func (zone Zone) Default() *log.Logger
- func (zone Zone) Delete(args ...any) Event
- func (zone Zone) DeleteError(args ...any) Event
- func (zone Zone) DeleteErrorf(format string, v ...any) Event
- func (zone Zone) Deletef(format string, v ...any) Event
- func (zone Zone) Down(args ...any) Event
- func (zone Zone) DownError(args ...any) Event
- func (zone Zone) DownErrorf(format string, v ...any) Event
- func (zone Zone) Downf(format string, v ...any) Event
- func (zone Zone) Encrypt(args ...any) Event
- func (zone Zone) EncryptError(args ...any) Event
- func (zone Zone) EncryptErrorf(format string, v ...any) Event
- func (zone Zone) Encryptf(format string, v ...any) Event
- func (zone Zone) Error(args ...any) Event
- func (zone Zone) Errorf(format string, v ...any) Event
- func (zone Zone) Fatal(args ...any)
- func (zone Zone) Fatalf(format string, v ...any)
- func (zone Zone) Found(args ...any) Event
- func (zone Zone) Foundf(format string, v ...any) Event
- func (zone Zone) Function(args ...any) Event
- func (zone Zone) FunctionError(args ...any) Event
- func (zone Zone) FunctionErrorf(format string, v ...any) Event
- func (zone Zone) Functionf(format string, v ...any) Event
- func (zone Zone) Good(args ...any) Event
- func (zone Zone) Goodf(format string, v ...any) Event
- func (zone Zone) In(args ...any) Event
- func (zone Zone) InError(args ...any) Event
- func (zone Zone) InErrorf(format string, v ...any) Event
- func (zone Zone) Inf(format string, v ...any) Event
- func (zone Zone) Info(args ...any) Event
- func (zone Zone) Infof(format string, v ...any) Event
- func (zone Zone) Init(args ...any) Event
- func (zone Zone) InitError(args ...any) Event
- func (zone Zone) InitErrorf(format string, v ...any) Event
- func (zone Zone) Initf(format string, v ...any) Event
- func (zone Zone) Input(args ...any) Event
- func (zone Zone) InputError(args ...any) Event
- func (zone Zone) InputErrorf(format string, v ...any) Event
- func (zone Zone) Inputf(format string, v ...any) Event
- func (zone Zone) Key(args ...any) Event
- func (zone Zone) KeyError(args ...any) Event
- func (zone Zone) KeyErrorf(format string, v ...any) Event
- func (zone Zone) Keyf(format string, v ...any) Event
- func (zone Zone) Line(args ...any) Event
- func (zone Zone) LineError(args ...any) Event
- func (zone Zone) LineErrorf(format string, v ...any) Event
- func (zone Zone) Linef(format string, v ...any) Event
- func (zone Zone) N(name string) Zone
- func (zone Zone) NewEvent(emoji string, isError bool, args ...any) Event
- func (zone Zone) NotFound(args ...any) Event
- func (zone Zone) NotFoundf(format string, v ...any) Event
- func (zone Zone) Ok(args ...any) Event
- func (zone Zone) Okf(format string, v ...any) Event
- func (zone Zone) Out(args ...any) Event
- func (zone Zone) OutError(args ...any) Event
- func (zone Zone) OutErrorf(format string, v ...any) Event
- func (zone Zone) Outf(format string, v ...any) Event
- func (zone Zone) Output(args ...any) Event
- func (zone Zone) OutputError(args ...any) Event
- func (zone Zone) OutputErrorf(format string, v ...any) Event
- func (zone Zone) Outputf(format string, v ...any) Event
- func (zone Zone) Panic(args ...any)
- func (zone Zone) Panicf(format string, v ...any)
- func (zone Zone) Param(args ...any) Event
- func (zone Zone) ParamError(args ...any) Event
- func (zone Zone) ParamErrorf(format string, v ...any) Event
- func (zone Zone) Paramf(format string, v ...any) Event
- func (zone Zone) Print(args ...any) Event
- func (zone Zone) Printf(format string, v ...any) Event
- func (zone Zone) Query(args ...any) Event
- func (zone Zone) QueryError(args ...any) Event
- func (zone Zone) QueryErrorf(format string, v ...any) Event
- func (zone Zone) Queryf(format string, v ...any) Event
- func (zone Zone) RefreshToken(args ...any) Event
- func (zone Zone) RefreshTokenf(format string, v ...any) Event
- func (zone Zone) RequestGet(args ...any) Event
- func (zone Zone) RequestGetError(args ...any) Event
- func (zone Zone) RequestGetErrorf(format string, v ...any) Event
- func (zone Zone) RequestGetf(format string, v ...any) Event
- func (zone Zone) RequestPost(args ...any) Event
- func (zone Zone) RequestPostError(args ...any) Event
- func (zone Zone) RequestPostErrorf(format string, v ...any) Event
- func (zone Zone) RequestPostf(format string, v ...any) Event
- func (zone Zone) Result(args ...any) Event
- func (zone Zone) Resultf(format string, v ...any) Event
- func (zone Zone) S(callDepth ...int) Zone
- func (zone Zone) Save(args ...any) Event
- func (zone Zone) SaveError(args ...any) Event
- func (zone Zone) SaveErrorf(format string, v ...any) Event
- func (zone Zone) Savef(format string, v ...any) Event
- func (zone Zone) Security(args ...any) Event
- func (zone Zone) SecurityError(args ...any) Event
- func (zone Zone) SecurityErrorf(format string, v ...any) Event
- func (zone Zone) Securityf(format string, v ...any) Event
- func (zone Zone) SetHook(hook func(Event)) Zone
- func (zone Zone) SmallArrowDown(args ...any) Event
- func (zone Zone) SmallArrowDownf(format string, v ...any) Event
- func (zone Zone) SmallArrowIn(args ...any) Event
- func (zone Zone) SmallArrowInf(format string, v ...any) Event
- func (zone Zone) SmallArrowOut(args ...any) Event
- func (zone Zone) SmallArrowOutf(format string, v ...any) Event
- func (zone Zone) SmallArrowUp(args ...any) Event
- func (zone Zone) SmallArrowUpf(format string, v ...any) Event
- func (zone Zone) Start(args ...any) Event
- func (zone Zone) StartError(args ...any) Event
- func (zone Zone) StartErrorf(format string, v ...any) Event
- func (zone Zone) Startf(format string, v ...any) Event
- func (zone Zone) State(args ...any) Event
- func (zone Zone) StateError(args ...any) Event
- func (zone Zone) StateErrorf(format string, v ...any) Event
- func (zone Zone) Statef(format string, v ...any) Event
- func (zone Zone) Stop(args ...any) Event
- func (zone Zone) StopError(args ...any) Event
- func (zone Zone) StopErrorf(format string, v ...any) Event
- func (zone Zone) Stopf(format string, v ...any) Event
- func (zone Zone) Time(args ...any) Event
- func (zone Zone) TimeError(args ...any) Event
- func (zone Zone) TimeErrorf(format string, v ...any) Event
- func (zone Zone) Timef(format string, v ...any) Event
- func (zone Zone) Trace(args ...any) Event
- func (zone Zone) Tracef(format string, v ...any) Event
- func (zone Zone) Transmit(args ...any) Event
- func (zone Zone) TransmitError(args ...any) Event
- func (zone Zone) TransmitErrorf(format string, v ...any) Event
- func (zone Zone) Transmitf(format string, v ...any) Event
- func (zone Zone) Up(args ...any) Event
- func (zone Zone) UpError(args ...any) Event
- func (zone Zone) UpErrorf(format string, v ...any) Event
- func (zone Zone) Update(args ...any) Event
- func (zone Zone) UpdateError(args ...any) Event
- func (zone Zone) UpdateErrorf(format string, v ...any) Event
- func (zone Zone) Updatef(format string, v ...any) Event
- func (zone Zone) Upf(format string, v ...any) Event
- func (zone Zone) V(auto ...bool) Zone
- func (zone Zone) Warn(args ...any) Event
- func (zone Zone) Warnf(format string, v ...any) Event
- func (zone Zone) Warning(args ...any) Event
- func (zone Zone) Warningf(format string, v ...any) Event
Constants ¶
This section is empty.
Variables ¶
var DefaultZone = Zone{ Name: "", Verbose: Auto, StackInfo: Auto, Hook: nil, }
DefaultZone allows to use emo without having to create a new zone. DefaultZone defines the default values.
Functions ¶
func GlobalColoring ¶
func GlobalColoring(enable bool)
GlobalColoring enables/disables the coloring of the event print.
func GlobalHook ¶
func GlobalHook(hook func(Event))
SetHook sets the callback function to be triggered by all zones.
func GlobalStackInfo ¶
func GlobalStackInfo(enable bool)
GlobalStackInfo enables/disables the call stack information for all zones having StackInfo=Auto.
func GlobalTimestamp ¶
func GlobalTimestamp(enable bool)
GlobalTimestamp enables the insertion of a date/time timestamp for each event print. To disable use:
emo.GlobalTimestamp(false)
func GlobalTracing ¶
func GlobalTracing(enable bool)
GlobalTracing enables the print of the Trace() events.
func GlobalVerbosity ¶
func GlobalVerbosity(enable bool)
GlobalVerbosity controls the verbose mode for all zones having Verbose=Auto.
func ObjectInfo ¶
func ObjectInfo(args ...any)
ObjectInfo prints elements list for debugging purpose.
Types ¶
type Event ¶
type Event struct {
Emoji string
Zone Zone
IsError bool
Args []any
From string
File string
Line int
// contains filtered or unexported fields
}
Event : base emo event.
func AccessToken ¶
func AccessTokenf ¶
func Aconstructor ¶
func AconstructorError ¶
func AconstructorErrorf ¶
func Aconstructorf ¶
func ArrowDownf ¶
func BuildError ¶
func BuildErrorf ¶
func DataErrorf ¶
func DecryptError ¶
func DecryptErrorf ¶
func DeleteError ¶
func DeleteErrorf ¶
func DownErrorf ¶
func EncryptError ¶
func EncryptErrorf ¶
func FunctionError ¶
func FunctionErrorf ¶
func InitErrorf ¶
func InputError ¶
func InputErrorf ¶
func LineErrorf ¶
func OutputError ¶
func OutputErrorf ¶
func ParamError ¶
func ParamErrorf ¶
func Print ¶
Warn looks same as Warning, but:
- Warn is printed even when Verbose=No, and
- Warn is printed with the call stack info (similar to Error).
func QueryError ¶
func QueryErrorf ¶
func RefreshToken ¶
func RefreshTokenf ¶
func RequestGet ¶
func RequestGetError ¶
func RequestGetErrorf ¶
func RequestGetf ¶
func RequestPost ¶
func RequestPostError ¶
func RequestPostErrorf ¶
func RequestPostf ¶
func SaveErrorf ¶
func SecurityError ¶
func SecurityErrorf ¶
func SmallArrowDown ¶
func SmallArrowDownf ¶
func SmallArrowIn ¶
func SmallArrowInf ¶
func SmallArrowOut ¶
func SmallArrowOutf ¶
func SmallArrowUp ¶
func SmallArrowUpf ¶
func StartError ¶
func StartErrorf ¶
func StateError ¶
func StateErrorf ¶
func StopErrorf ¶
func TimeErrorf ¶
func TransmitError ¶
func TransmitErrorf ¶
func UpdateError ¶
func UpdateErrorf ¶
func Warn ¶
Warn looks same as Warning, but:
- Warn is printed even when Verbose=No, and
- Warn is printed with the call stack info (similar to Error).
type Zone ¶
type Zone struct {
Name string
Verbose ParamType // true => always print ; false => print only when isError
StackInfo ParamType // StackNo => never print the call stack info, StackAuto => only when Verbose=true and isError
Hook func(Event)
}
Zone : base emo zone.
func (Zone) AccessToken ¶
func (Zone) Aconstructor ¶
func (Zone) AconstructorError ¶
func (Zone) BuildError ¶
func (Zone) DecryptError ¶
func (Zone) DeleteError ¶
func (Zone) EncryptError ¶
func (Zone) FunctionError ¶
func (Zone) InputError ¶
func (Zone) N ¶
N changes zone name and can be used, for example, to temporary change the current event name:
zone.N("foo").Info("bar")
func (Zone) OutputError ¶
func (Zone) ParamError ¶
func (Zone) QueryError ¶
func (Zone) RefreshToken ¶
func (Zone) RequestGet ¶
func (Zone) RequestGetError ¶
func (Zone) RequestPost ¶
func (Zone) RequestPostError ¶
func (Zone) S ¶
S controls the printing of the call stack information. Without arguments, S forces the retrieval of the call stack info (i.e. caller function and file:line).
The call stack depth can be shifted with the optional parameter:
func myLoggerFunction(s string) { zone.S(2).Error(s) }
S can also be used to disable the call stack info using a negative value:
zone.S(-1).Error("msg")
The zero value is to use the global settings:
zone.S(0).Error("msg")
func (Zone) SecurityError ¶
func (Zone) SmallArrowDown ¶
func (Zone) SmallArrowIn ¶
func (Zone) SmallArrowOut ¶
func (Zone) SmallArrowUp ¶
func (Zone) StartError ¶
func (Zone) StateError ¶
func (Zone) TransmitError ¶
func (Zone) UpdateError ¶
func (Zone) V ¶
SetVerbosity controls the verbose mode. When used with DefaultZone, it impacts all zones having Verbose=Auto. V forces the event to be always printed, even when zone.Verbose=false.
V can also be used to never print the log. Example:
zone.V(false).Error("my error")