https://flyte.org logo
#ask-the-community
Title
# ask-the-community
g

Guy Harel

01/21/2024, 12:40 PM
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

Ketan (kumare3)

01/21/2024, 3:42 PM
Python logging uses levels in multiples of 10
g

Guy Harel

01/22/2024, 10:25 AM
Thanks, I will try, the logs were generated by Go code so I thought it was using Go levels...
c

Chris Grass

01/22/2024, 2:33 PM
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

Guy Harel

01/25/2024, 3:35 PM
@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

Chris Grass

01/25/2024, 3:36 PM
correct, higher int value is more detail. the above is a zero based enum, so panic == 0, fatal == 1, error == 2, warn == 3
g

Guy Harel

01/25/2024, 3:37 PM
Got it, thank you!
4 Views