Skip to content

Conversation

@doanac
Copy link
Member

@doanac doanac commented Oct 21, 2025

No description provided.

This message is debug only and is making output noisy

Signed-off-by: Andy Doan <andy@foundries.io>
@doanac doanac requested review from detsch, mike-sul and vkhoroz October 21, 2025 17:08
@doanac
Copy link
Member Author

doanac commented Oct 21, 2025

@mike-sul @detsch @vkhoroz - i don't really like this, but I'm trying to find a way that we can use this in Fioup to look more like the other CLI commands its doing. I'm open to suggestions.

internal/app.go Outdated
all_fname := make(map[string]bool)
for fname, cfgFile := range config.next {
slog.Info("Extracting file", "file", fname)
a.InfoLogger("Extracting file", "name", fname)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could configure slog in such the way that it modifies output format at the command initialization and does not require any changes in code that uses slog, so each slog.Info/Debug occurrences remain intact.

I believe @detsch investigated such possibility for zerolog, and answer was positive. Specifically, zerolog.Info would produce normal log like message in case of the daemon operation and terminal like output in case of the CLI commands. Now, we need to check it out for slog.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting a custom slog logger when running in CLI mode seems more appropriate. It would allow the output changes we want without needing to replace slog.Info calls.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've force-pushed a new variation that is looking better to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now - should I expose this log handler for Fioup to use, or should we just do the same/similar thing in that code base?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now - should I expose this log handler for Fioup to use, or should we just do the same/similar thing in that code base?

Exposing the handler would be nice, so that we can easily keep the logic consistent among the tools.

The trailing period doesn't match our other logging logic and messes up
with the format I'm trying to achieve in the next change

Signed-off-by: Andy Doan <andy@foundries.io>
@doanac doanac force-pushed the logging-changes branch 2 times, most recently from b39d9af to b92c4f9 Compare October 22, 2025 16:27
@doanac doanac force-pushed the logging-changes branch 2 times, most recently from 28a737d to 38274d5 Compare October 23, 2025 03:15
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
@doanac doanac merged commit e80fce0 into foundriesio:main Oct 23, 2025
2 checks passed
@doanac doanac deleted the logging-changes branch October 23, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants