Skip to content

Comments

chore: log after setting level#41

Merged
Alonza0314 merged 1 commit intofree5gc:mainfrom
gruyaume:dev-disablelog
Dec 19, 2025
Merged

chore: log after setting level#41
Alonza0314 merged 1 commit intofree5gc:mainfrom
gruyaume:dev-disablelog

Conversation

@gruyaume
Copy link
Contributor

@gruyaume gruyaume commented Dec 16, 2025

Overview

Hi and thank you for maintaining the NAS library. We use it in Ella Core, and we log differently from this library. Because of this reason we want to disable logging in the nas library. To do so, we could set the log level to "panic", but the lib still logs a set log level message right as we do so. Here we change the order of setting the log level and logging set log level in order for this log to never show up in our deployments.

Longer term: replace logging with returning errors

Most libraries return errors and leave logging decisions to the caller. This allows the lib to be used by different projects with varying approaches to logging. I think this approach would be preferable here, but it would be a larger effort and a breaking change.

If you are interested in taking that route, I have a branch of nas that does exactly that:

Signed-off-by: Guillaume Belanger <guillaume.belanger27@gmail.com>
Copy link
Contributor

@roundspring2003 roundspring2003 left a comment

Choose a reason for hiding this comment

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

lgtm

@Alonza0314 Alonza0314 merged commit 2a6f208 into free5gc:main Dec 19, 2025
2 checks passed
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.

3 participants