-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
(#1513) Replace console
with client-logger
and node-logger
packages
#2347
Conversation
d682c29
to
e35045f
Compare
Codecov Report
@@ Coverage Diff @@
## release/3.3 #2347 +/- ##
===============================================
+ Coverage 21.48% 21.58% +0.09%
===============================================
Files 337 339 +2
Lines 7098 7107 +9
Branches 875 880 +5
===============================================
+ Hits 1525 1534 +9
+ Misses 4934 4915 -19
- Partials 639 658 +19
Continue to review full report at Codecov.
|
There seems to be some sort of issue with the build step of the integration tests that is happening on circle but not local for me 😕 It ends with
|
Why? |
@@ -3,14 +3,13 @@ | |||
import React from 'react'; | |||
import ReactDOM from 'react-dom'; | |||
import { stripIndents } from 'common-tags'; | |||
import logger from 'npmlog'; |
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.
Does it work on client?
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.
(facepalm) It was late when I was working on this. Thanks @Hypnosphi. I was indeed trying to use a node logger in a browser environment.
I just wanted to make sure that this was what the team wanted, before making the change throughout the ecosystem. |
@Hypnosphi @ndelangen Do you guys prefer to import |
console
with npmlog
in app/react
console
with npmlog
Sounds like a good thing indeed, if we want to change logger, we can do it in a central location 👍 |
@dangreenisrael I usually take some screenshots of the changes just before opening up the PR, so I can post them. At least for me, it helps visualise and remember what the PR is about, what it's doing. 👍 |
console
with npmlog
console
with logger
package
console
with logger
packageconsole
with logger
package
…storybooks/storybook into Replace-console.log-with-npmlog
@dangreenisrael feel free to merge if you think it's ready |
console
with logger
packageconsole
with client-logger
and node-logger
packages
b699f7e
to
03576fc
Compare
2fa1b27
to
fa16aa8
Compare
As you wish. I think there’s a sense in adding this to all the packages that log anything |
@Hypnosphi I think I would prefer to do each platform in its own, smaller PR. I think that keeping PRs small makes things more manageable, and makes it easier to track down bugs if they are introduced. |
Will it be a separate PR for each addon and utility package ( |
Not all of the addons use console.log. I will probably do one PR for the each of the platforms, and one PR for the all of the addons . Also, if I run out of time doing this, I want it to be as easy as possible for someone else to takeover. |
Issue: #1513
What I did
Added a logger package containing a logger to be use in the browser and another to be used in node.
Note: This is for work in progress. Any feedback is more than welcome.
How to test
Is this testable with jest or storyshots?
Jest
Does this need a new example in the kitchen sink apps?
No
Does this need an update to the documentation?
Yes, it will need to be documented for add-on developers
If your answer is yes to any of these, please make sure to include it in your PR.
Screenshots
Node
Browser