Documentation ¶
Overview ¶
Package logging implements a custom slog logger for Blueprint.
The custom logger adds additional callsite information to logging statements, to provide more information during the compilation process about which plugins are producing logs or errors, and to tie that information back to the corresponding wiring line.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableCompilerLogging ¶
func DisableCompilerLogging()
Disables logging by the compiler; useful when running tests to suppress verbose output.
func EnableCompilerLogging ¶
func EnableCompilerLogging()
Compiler logging is enabled by default; this method is useful for tests to disable and enable logging in order to suppress output.
Types ¶
type Callsite ¶
Used to tie logging statements and errors back to the wiring file line that caused the error
type Callstack ¶
type Callstack struct {
Stack []Callsite
}
Used to tie logging statements and errors back to the wiring file line that caused the error
func GetCallstack ¶
func GetCallstack() *Callstack
Gets the current callstack including file information. Blueprint's wiring spec uses this so that logging statements and error messages can be attributed back to the appropriate wiring spec line.