Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultComponent = "kubehound"
)
Variables ¶
View Source
var I = Base()
I Global logger instance for use through the app
Functions ¶
func AddGlobalTags ¶
AddGlobalTags adds global tags to all application loggers.
Types ¶
type KubehoundLogger ¶
Require our logger to append job or API related fields for easier filtering and parsing of logs within custom dashboards. Sticking to the "structured" log types also enables out of the box correlation of APM traces and log messages without the need for a custom index pipeline. See: https://docs.datadoghq.com/logs/log_collection/go/#configure-your-logger
func Trace ¶
func Trace(ctx context.Context, opts ...LoggerOption) *KubehoundLogger
Trace creates a logger from the current context, attaching trace and span IDs for use with APM.
type LoggerConfig ¶
type LoggerOption ¶
func WithComponent ¶
func WithComponent(name string) LoggerOption
WithComponent adds a component name tag to the logger.
Click to show internal directories.
Click to hide internal directories.