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

Add default stderr logger for logging to nullptr. #825

Merged
merged 1 commit into from
Mar 16, 2018

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Feb 27, 2018

This is useful for debugging a function that doesn't have a logger
available. It should not be used in production code, since it outputs to
stderr.


This change is Reviewable

@iphydf iphydf added this to the v0.2.x milestone Feb 27, 2018
@iphydf iphydf force-pushed the logger-stderr branch 3 times, most recently from d0126d6 to 914b49c Compare February 27, 2018 05:52
@iphydf iphydf modified the milestones: v0.2.1, v0.2.x Mar 9, 2018
@sudden6
Copy link

sudden6 commented Mar 12, 2018

If it should not be used in production code, there should be instructions in the header to not use it in production code. The behavior of logging to stderr in case a nullptr is supplied should also be documented there. Maybe even a #warning if compiled in release mode, not sure if that's that easy to implement though.

@iphydf iphydf force-pushed the logger-stderr branch 2 times, most recently from f9c6936 to f4a7729 Compare March 16, 2018 02:11
@iphydf
Copy link
Member Author

iphydf commented Mar 16, 2018

@sudden6 done: added a comment.

@iphydf iphydf modified the milestones: v0.2.x, v0.2.2 Mar 16, 2018
This is useful for debugging a function that doesn't have a logger
available. It should not be used in production code, since it outputs to
stderr.
@sudden6
Copy link

sudden6 commented Mar 16, 2018

:lgtm_strong:


Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@iphydf iphydf merged commit 2f39bd3 into TokTok:master Mar 16, 2018
@iphydf iphydf deleted the logger-stderr branch March 16, 2018 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants