Hi all, I have a question about logging. I am usin...
# ask-the-community
g
Hi all, I have a question about logging. I am using flyte's helm chart to deploy flyte-binary (chart version flyte-binary-v1.10.6). I've configured logging to level 4, which in my understanding is "error". I've done this via the yaml entry: configuration.logging.level = 4. To double check, I exec'ed into flyte's pod and made sure the in /etc/flyte/config.d/000-core.yaml, the value for logger.level is 4. However, my log file is filled with "info" level messages... Am I using the incorrect level? I want to only display errors and above.
k
Python logging uses levels in multiples of 10
g
Thanks, I will try, the logs were generated by Go code so I thought it was using Go levels...
c
However, my log file is filled with "info" level messages
i think 4 ==
Info
in the Go code:
Copy code
const (
	// PanicLevel level, highest level of severity. Logs and then calls panic with the
	// message passed to Debug, Info, ...
	PanicLevel Level = iota
	// FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the
	// logging level is set to Panic.
	FatalLevel
	// ErrorLevel level. Logs. Used for errors that should definitely be noted.
	// Commonly used for hooks to send errors to an error tracking service.
	ErrorLevel
	// WarnLevel level. Non-critical entries that deserve eyes.
	WarnLevel
	// InfoLevel level. General operational entries about what's going on inside the
	// application.
	InfoLevel
	// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
	DebugLevel
	// TraceLevel level. Designates finer-grained informational events than the Debug.
	TraceLevel
)
g
@Chris Grass I'm not too familiar with Go, so does a higher level mean more detail or less? Ie, if I only want warning or more severe, do I need to set it to 3 or to 5?
c
correct, higher int value is more detail. the above is a zero based enum, so panic == 0, fatal == 1, error == 2, warn == 3
g
Got it, thank you!