Documentation ¶
Overview ¶
Forwards all logging to Fluentd
Index ¶
- func Fluentf(errorLevel string, format string, a ...interface{})
- func FluentfContext(errorLevel string, context context.Context, format string, a ...interface{})
- func FluentfObject(errorLevel string, objectToLog interface{}, format string, a ...interface{})
- func Init()
- func InitWithConfigPath(configFilePath string)
- func Printf(format string, a ...interface{})
- func Println(a string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fluentf ¶
Log a formatted string to Fluent. It is suggested that 'tag' be set to the name of the source file. eg "log.go" Otherwise, 'tag' can be set to an empty string if the default tag of 'enu.$ENV.$HOSTNAME' is sufficient Use this function whenever doing general logging which doesn't require the context to be logged If the environment variable ENV=dev then this function will also log to stdout
func FluentfContext ¶
Log a formatted string with a corresponding context to Fluent. The values from the context are copied to a local struct If the environment variable ENV=dev then this function will also log to stdout
func FluentfObject ¶
Log a formatted string with a corresponding context to Fluent. The values from the context are copied to a local struct If the environment variable ENV=dev then this function will also log to stdout
func InitWithConfigPath ¶
func InitWithConfigPath(configFilePath string)
func Printf ¶
func Printf(format string, a ...interface{})
Compatibility function with existing logger. Writes a copy of the string to format to stdout but also sends a copy to Fluent Uses a default tag of 'enu.$ENV.$HOSTNAME' Note: If unable to forward to Fluent, this function will NOT raise errors with respect to Fluent
func Println ¶
func Println(a string)
Compatibility function with existing logger. Writes a copy of the string to format to stdout but also sends a copy to Fluent Uses a default tag of 'enu.$ENV.$HOSTNAME' Note: If unable to forward to Fluent, this function will NOT raise errors with respect to Fluent
Types ¶
This section is empty.