Skip to content

Support "trace" log level [v8]#3526

Closed
marckhouzam wants to merge 1 commit intocloudfoundry:v8from
marckhouzam:marck/traceLogs
Closed

Support "trace" log level [v8]#3526
marckhouzam wants to merge 1 commit intocloudfoundry:v8from
marckhouzam:marck/traceLogs

Conversation

@marckhouzam
Copy link
Copy Markdown
Contributor

Description of the Change

This PR allows to use the trace keyword to set a log level, as supported by the "logrus" library as seen here https://github.com/sirupsen/logrus/blob/d1e6332644483cfee14de11099f03645561d55f8/logrus.go#L111

The PR takes the approach of parsing log levels using a "logrus" library function instead of duplicating the code locally.

Why Is This PR Valuable?

It allow to use CF_LOGL_LEVEL=trace when debugging, which is supported by the log library.
It would also open the door to the CLI code to use log.Trace() for an extra level of logs.

Applicable Issues

Fixes #3525

How Urgent Is The Change?

Not urgent.

The "logrus" library supports a "trace=6" log level, but the CLI does
not accept the "trace" word for this level.

Signed-off-by: Marc Khouzam <marc.khouzam@broadcom.com>
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

Copy link
Copy Markdown
Member

@gururajsh gururajsh left a comment

Choose a reason for hiding this comment

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

LGTM

@marckhouzam
Copy link
Copy Markdown
Contributor Author

It was brought up that using the word trace might cause confusion with CF_TRACE which is a completely different thing. Let's keep this PR on ice until we have more time to discuss.

@gururajsh
Copy link
Copy Markdown
Member

@marckhouzam can we close this if not needed now?

@marckhouzam
Copy link
Copy Markdown
Contributor Author

OK, let’s close for the moment

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