Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cleanup ¶
func Cleanup()
Cleanup do clean up for any writers and SHOULD be called before program exit to make sure no lingering resource still opened while program exit and will lead to resource leakage.
func Off ¶
Off give signal to logger to not write log. Simply inject this to Activity, Runtime or Worker.
func SetOutput ¶
func SetOutput(w io.WriteCloser)
SetOutput set the output of the logs to given writer. By default, will print to the predefined logs directory ./storage/logs/.
Types ¶
type ActLogger ¶
type ActLogger interface { // Info log given payload in INFO level. Info(Map) }
ActLogger activity logger and can be accessed with Activity.
This logger may not often be used by most developers since this may only be used inside middleware.
type RunLogger ¶
type RunLogger interface { // Info log given payload in INFO level. Info(Map) // Warning log given payload in WARNING level. Warning(Map) // Error log given payload in ERROR level. Error(Map) }
RunLogger runtime logger and can be accessed with Runtime.
This logger may be the most widely used by developers since this can be used in almost anywhere in the system.
type WorkLogger ¶
type WorkLogger interface { // Info log given payload in INFO level. Info(Map) }
WorkLogger worker logger and can be accessed with Worker.
This logger may only be used in worker or job process.