Simple render logger?
See original GitHub issueHi Vitali!
I really like WhyDidYouRender and want to thank you one more time, от души!
How difficult it would be to create a logger for printing component names being rendered? Without any options (except for on/off), just simple names printing. In my understanding it’s just a minor part of WDYR.
Currently we have to leave console.log("ComponentName render")
or like in every component and optionally wrap it into if (process.env.NODE_ENV === "development") {...}
-s. But going WYDR way, we could have just a single initialization call in the index.js
and then get logging enabled for every component.
I think such a tool would be very helpful.
P.S. Let’s imagine what it could have looked like:
if (process.env.NODE_ENV === "development") {
const renderLogger = require("@welldone-software/render-logger");
renderLogger(React, {
enabled: true
});
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:16
Top Results From Across the Web
logging and rendering a table · Discussion #1799 - GitHub
Now I am trying have a rich.table rendered in a log entry with the ... logging is not designed for anything other that...
Read more >Logging renders? - Blender Stack Exchange
Is there a simple way to log/save every render that you make in a Blender scene? Maybe an add-on? This would be helpful...
Read more >Logging Cookbook — Python 3.11.1 documentation
A simple web application which performs logging via a socket connected to the ... have logging messages rendered in an audible rather than...
Read more >Configuring Logging - Quarkus
Render the time in milliseconds since the start of the application log. %s. Simple message. Renders just the log message, with no exception...
Read more >layout_json: Generate log layout function rendering JSON
Generate log layout function rendering JSON. ... of a Log Record Introduction to logger Logging from R Packages Migration Guide Simple Benchmarks on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hey!
take a look at this fixed version: https://codesandbox.io/s/wdyr-simple-logger-11-fix-p3ilj
I updated the readme yesterday to eliminate these edge cases: https://github.com/welldone-software/why-did-you-render#installation
the difference is that
wdyr
should be applies before elements are created, includingApp
.Thanks! Let me try. If/when I succeed I’ll come up with an example sandbox and a snippet.