Documentation ¶
Overview ¶
Package log is responsible for settings around logging output from customer functions to be sent to Datadog (logs monitoring product). It does *NOT* control the internal debug logging of the agent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupLogAgent ¶
func SetupLogAgent(conf *Config, tags map[string]string, tagger tagger.Component) logsAgent.ServerlessLogsAgent
SetupLogAgent creates the log agent and sets the base tags
Types ¶
type ChannelWriter ¶
type ChannelWriter struct { Buffer bytes.Buffer Channel chan *logConfig.ChannelMessage IsError bool }
ChannelWriter is a buffered writer that log lines (lines ending with a \n) to a channel to be sent to our intake.
func NewChannelWriter ¶
func NewChannelWriter(ch chan *logConfig.ChannelMessage, isError bool) *ChannelWriter
NewChannelWriter returns a new channel writer. Implements io.Writer, used for redirecting stdout/stderr logs to Datadog.
type Config ¶
type Config struct { FlushTimeout time.Duration Channel chan *logConfig.ChannelMessage IsEnabled bool // contains filtered or unexported fields }
Config holds the log configuration
func CreateConfig ¶
CreateConfig builds and returns a log config
Click to show internal directories.
Click to hide internal directories.