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

Effectively EOL testing.NullLogger #36

Merged
merged 1 commit into from Jan 23, 2021

Conversation

thockin
Copy link
Contributor

@thockin thockin commented Jan 5, 2021

It remains as a type, but is just an alias to DiscardLogger.

Fixes #33

I could be talked into simply deleting the type - thoughts?

@DirectXMan12

@wojas
Copy link
Contributor

wojas commented Jan 6, 2021

I would slightly favor keeping it in case someone uses it, but I am OK either way.

godoc suggests some special syntax for deprecation:

Sometimes a struct field, function, type, or even a whole package becomes redundant or unnecessary, but must be kept for compatibility with existing programs. To signal that an identifier should not be used, add a paragraph to its doc comment that begins with "Deprecated:" followed by some information about the deprecation. There are a few examples in the standard library.

https://blog.golang.org/godoc

Example:

// Deprecated: use logr.DiscardLogger instead

This does not result in any special markup on godoc, but may be supported by certain linters and IDEs. The InfoLogger deprecation notice also uses this.

It remains as a type, but is just an alias to DiscardLogger.
Copy link
Contributor

@DirectXMan12 DirectXMan12 left a comment

Choose a reason for hiding this comment

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

Deprecated is fine with me. We actually ended up copying NullLogger into CR because it was in a test package. I should switch us to use DiscardLogger instead :-).

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.

Reconcile NullLogger and discardLogger
3 participants