-
Notifications
You must be signed in to change notification settings - Fork 142
Replace console.warn with logger.warn: componentParser.js #1207
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
Conversation
|
should we fix the root cause of the tests failing first instead? ( mocking fs for |
Even if we fix the root cause, we would still have to do this change. Therefore, I thought of doing it now since the bug is fixed, albeit not as ideally. 😄 Should I raise a new issue or rewrite the #1060 ? |
|
Ahh ok, I'm fine with either. If that's the case perhaps could replace the usages in *edited your comment when quoting by accident |
Sounds good, I can do that here. |
|
Should i be changing this line as well? markbind/src/lib/markbind/src/parser.js Line 37 in 68eaefb
|
Yes, think we could remove it completely though, and all instances of |
Hm, not entirely sure what you mean. |
It's a workaround for not being to import
|
8487c0b to
7f3ed60
Compare
ang-zeyu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [ ] Documentation update
• [ ] Bug fix
• [ ] New feature
• [ ] Enhancement to an existing feature
• [X] Other, please explain: Finishing up a todo from #1057
What is the rationale for this request?
This is a follow up to #1057 where
console.warnis used instead oflogger.warndue to a bug as raised in #1060. The test no long fail in #1117 by mocking logger in theparser.test.js. Although the approach could be improved.What changes did you make? (Give an overview)
Replaced all
console.warnwithlogger.warnas indicated by the TODO signposts.Testing instructions:
Run tests to check if anything regressed
markbind servethe example code in the gist.https://gist.github.com/nbriannl/5c44b3ee8a8af78c45a7a4f3659ce196
You should now see

Proposed commit message: (wrap lines at 72 characters)
Replace console.warn with logger.warn,
A follow up to #1057.
Let us also remove console.error as the error handler
And directly set the error handler to be logger during init