Documentation ¶
Overview ¶
Package cout is a simple log handling solution for the c2 package. This is used internally to create loggers and to disable logging if needed, such as the "client" built tag being used.
Index ¶
Constants ¶
const Enabled = true
Enabled is a compile time constant that can be used to disable/enable the logx Logger and prevent any un-needed fmt calls as the client does not /naturally/ need to produce output.
Only needed for debug purposes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
Log is an interface for any type of struct that supports standard Logging functions.
func (Log) Debug ¶
Debug writes a debugging message to the logger. The function arguments are similar to fmt.Sprintf and fmt.Printf. The first argument is a string that can contain formatting characters. The second argument is a vardict of interfaces that can be omitted or used in the supplied format string.
func (Log) Error ¶
Error writes an error message to the logger. The function arguments are similar to fmt.Sprintf and fmt.Printf. The first argument is a string that can contain formatting characters. The second argument is a vardict of interfaces that can be omitted or used in the supplied format string.
func (Log) Info ¶
Info writes an informational message to the logger. The function arguments are similar to fmt.Sprintf and fmt.Printf. The first argument is a string that can contain formatting characters. The second argument is a vardict of interfaces that can be omitted or used in the supplied format string.
func (*Log) Set ¶
Set updates the internal logger. This function is a NOP if the logger is nil or logging is not enabled via the 'client' build tag.
func (Log) Trace ¶
Trace writes a tracing message to the logger. The function arguments are similar to fmt.Sprintf and fmt.Printf. The first argument is a string that can contain formatting characters. The second argument is a vardict of interfaces that can be omitted or used in the supplied format string.
func (Log) Warning ¶
Warning writes a warning message to the logger. The function arguments are similar to fmt.Sprintf and fmt.Printf. The first argument is a string that can contain formatting characters. The second argument is a vardict of interfaces that can be omitted or used in the supplied format string.