Skip to content

Conversation

@gab-arrobo
Copy link
Contributor

Additionally: Move zap to the correct location in go.mod (From indirect block to direct block)

Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
@gab-arrobo gab-arrobo requested review from a team and Copilot November 21, 2025 19:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the logging level initialization code in the SMF service to reduce code duplication by extracting common logic into a reusable helper function. The change also correctly moves the go.uber.org/zap dependency from the indirect section to the direct dependencies section in go.mod, reflecting its actual usage in the codebase.

Key Changes:

  • Introduced setModuleLogLevel helper function to eliminate repetitive log level setup code
  • Updated log messages for clarity and consistency
  • Corrected go.mod to reflect direct dependency on go.uber.org/zap

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
service/init.go Refactored setLogLevel() to use a new setModuleLogLevel() helper function, eliminating ~70 lines of duplicated log level initialization code across multiple modules (SMF, NAS, NGAP, OpenApi, Util)
go.mod Moved go.uber.org/zap v1.27.1 from indirect dependencies to direct dependencies to accurately reflect its usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
@gab-arrobo gab-arrobo requested a review from Copilot November 21, 2025 20:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gab-arrobo gab-arrobo merged commit f478059 into omec-project:main Nov 21, 2025
10 checks passed
@gab-arrobo gab-arrobo deleted the refactor-logging branch November 21, 2025 22:48
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.

2 participants