Documentation ¶
Index ¶
- type Logger
- func (logger Logger) Log(message string, params ...LoggerParams) (*logsService.RequestResult, error)
- func (logger Logger) LogIf(message string, condition func(params ...struct{}) bool, ...) (*logsService.RequestResult, error)
- func (logger Logger) LogWhenEnv(message string, params ...LoggerParams) (*logsService.RequestResult, error)
- type LoggerParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct{}
Main Logger struct
func (Logger) Log ¶
func (logger Logger) Log(message string, params ...LoggerParams) (*logsService.RequestResult, error)
Main Log function, sends a log whenever this function is called, assuming the connection is valid.
func (Logger) LogIf ¶ added in v0.2.0
func (logger Logger) LogIf(message string, condition func(params ...struct{}) bool, params ...LoggerParams) (*logsService.RequestResult, error)
Log function that only connects and sends if the given `condition` function pointer resolves to true.
func (Logger) LogWhenEnv ¶ added in v0.2.0
func (logger Logger) LogWhenEnv(message string, params ...LoggerParams) (*logsService.RequestResult, error)
Log function that only connects and sends when the "CODECTRL_DEBUG" environment variable is set.
type LoggerParams ¶
type LoggerParams struct {
// contains filtered or unexported fields
}
Optional parameters for the Logger interface methods.
func NewEmptyLoggerParams ¶ added in v0.2.0
func NewEmptyLoggerParams() LoggerParams
Creates a new, empty LoggerParams.
func NewLoggerParams ¶ added in v0.2.0
func NewLoggerParams(surround uint32, host string, port string) LoggerParams
Creates a new LoggerParams using the given parameters.
Click to show internal directories.
Click to hide internal directories.