Documentation
¶
Overview ¶
Package log provides configurable logging. It will detect if the process is running in kubernetes by searching for the "KUBERNETES_SERVICE_HOST" environment variable. If it is running in kubernetes it will output logs to stdout using json. If it is not running in kubernetes it will output logs in a standard single line readable format.
Additionally, you can set a LOG_LEVEL environment value to any of the following values, to retrieve only log levels from that level and above. The default log level is INFO for running in kubernetes and DEBUG when not.
FATAL ERROR WARN INFO DEBUG
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(msg string, keysAndValues ...interface{})
Debug logs a message with some additional context.
func Error ¶
func Error(msg string, keysAndValues ...interface{})
Error logs a message with some additional context.
func Fatal ¶
func Fatal(msg string, keysAndValues ...interface{})
Fatal logs a message with some additional context, then calls os.Exit.
Types ¶
This section is empty.