Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify NSM logging system #1308

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

anastasia-malysheva
Copy link
Contributor

@anastasia-malysheva anastasia-malysheva commented Jun 3, 2022

Description

EnableTracing was removed. Instead LogLevel is used to enable tracing if TraceLevel is set.

Issue link

#1272

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionallity
  • Documentation
  • Refactoring
  • CI

Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
@anastasia-malysheva anastasia-malysheva force-pushed the 1272-simplify-log-tracing branch from b07d7e9 to ebf273b Compare June 3, 2022 09:59
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
} else {
msg = fmt.Sprint(v)
registryInfo, ok := trace(ctx)
if ok && registryInfo.Request != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

This condition is always false

We don't need to check Request and Response, because these fields are used only for networkservice (not for registry)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@glazychev-art , fixes for both comments were made

)

// traceInfo - struct, containing string representations of request and response, used for tracing.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// traceInfo - struct, containing string representations of request and response, used for tracing.
type traceInfo struct {}

Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
@denis-tingaikin
Copy link
Member

@glazychev-art Is this ready to merge?

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