Documentation ¶
Index ¶
- Constants
- Variables
- func Assert(condition bool)
- func Assertf(condition bool, format string, variables ...interface{})
- func SetMessageFormat(messageFormat MessageFormat)
- func SetOut(out OutputChannel)
- func Write(variable interface{})
- func Writef(format string, variables ...interface{})
- type MessageFormat
- type OutputChannel
Constants ¶
View Source
const ( // Switches off other information in trace message PRINT_NONE MessageFormat = 0 // Switch to print time PRINT_TIME MessageFormat = 1 // Switch to print function name PRINT_PROC MessageFormat = 2 // Switch to print source file name PRINT_FILE MessageFormat = 4 // Switch yo print current line number PRINT_LINE MessageFormat = 8 // Switches on all formatting PRINT_ALL MessageFormat = PRINT_TIME | PRINT_PROC | PRINT_FILE | PRINT_LINE // Switches off printing OUT_NONE OutputChannel = 0 // Switch to print to Stdout OUT_STD OutputChannel = 1 // Switch to print to File OUT_FILE OutputChannel = 2 // Switches on both File & Stdout printing OUT_ALL OutputChannel = OUT_STD | OUT_FILE )
Variables ¶
View Source
var ( // Flag to enable or disable the Tracing ENABLE_TRACE bool = false // Trace log file path TRACE_FILE_PATH string )
Use these configuration variables to set tracing parameters
Functions ¶
func Assert ¶
func Assert(condition bool)
Checks for a condition; if the condition is false, writes a trace message that shows the call stack.
func Assertf ¶
Checks for a condition; if the condition is false, writes a specified message after formatting it according to a format specifier that shows the call stack.
func SetMessageFormat ¶
func SetMessageFormat(messageFormat MessageFormat)
Sets trace message format
Types ¶
type MessageFormat ¶
type MessageFormat byte
type OutputChannel ¶
type OutputChannel byte
Click to show internal directories.
Click to hide internal directories.