codectrl

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 NewLogger added in v0.2.0

func NewLogger() Logger

Creates a new Logger.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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