-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Development documentation (MM issue #3252) #218
base: develop
Are you sure you want to change the base?
Development documentation (MM issue #3252) #218
Conversation
8001704
to
b95fb5e
Compare
@KristjanESPERANTO @rejas I'd like to add a blurb about logging but I actually haven't been able to figure it out myself! How do I enable logging, where do the log files go, etc. |
there are no log files. there are two places where info is reported. this output is separated into two types. if you are using pm2, these two streams are captured separately, not comingled by time if you are not using pm2, then the output will be lost unless you use redirection to pipe the output to some file all this output is generated by the node_helper of every module that uses one the second place is in the browser developers window console. this output is not captured by anything. one can use a module like MMM-Logging to redirect this output to the normal output stream. but it affects performance. this browser output is collected from Log.log()/Log.error() statements in the browser component of a module. that's the JavaScript file that has the same name as the module. |
the calendar module uses console.debug() which is disabled by default. you can enable it by adding "DEBUG", to the logLevel property in config.js. and restarting MagicMirror this output is presented on the programs stderrr stream. only the calendar module uses this approach |
if you are using pm2 to launch MagicMirror, then the command
will display nnnn lines from each of the stderrr and stdout streams. (not joined by time) |
when viewing the content collected from stdout and stderrr, there is no built in capability to identify the module that generated the output in the browser developers window console, you can filter output by a using string found in the output, but not by module. by placing this string in the filter field of the console tab |
@sdetweil thanks, I'll digest this info and then write a portion in the core development documentation about it |
and then there is the elements tab where you can see and manipulate the styles on elements before adding them to custom.css see this for discussion on how to use |
and there is the sources tab where you can see and step thru the browser side code. see and manipulate variables |
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.
Could you add redirects for the old urls so that links from the forum (or other sources) can find the new urls?
See vuejs/vuepress#239 (comment) on how to do it
6edce54
to
0ffe867
Compare
@rejas I'm not really sure what needs to be redirected, or how to implement it based on the vuejs link. It seems like all of the old references in the current documentation develop branch have been updated. |
@sdetweil I've added documentation around your logging info, please review (and thanks!) |
I took the liberty to add the redirects and commit them to your branch (as well as some linting to your new pages). How do you think about it? |
{ path: '/development/introduction.html', redirect: '/module-development/introduction.html' }, | ||
{ path: '/development/core-module-file.html', redirect: '/module-development/core-module-file.html' }, | ||
{ path: '/development/node-helper.html', redirect: '/module-development/node-helper.html' }, | ||
{ path: '/development/helper-methods.html', redirect: '/module-development/helper-methods.html' }, | ||
{ path: '/development/logger.html', redirect: '/module-development/logger.html' }, | ||
{ path: '/development/notifications.html', redirect: '/module-development/notifications.html' }, | ||
{ path: '/development/weather-provider.html', redirect: '/module-development/weather-provider.html' }, | ||
{ path: '/development/documentation.html', redirect: '/module-development/documentation.html' } |
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.
Ah, this makes a lot more sense now 👍
@rejas looks good! Thanks for doing that 👍 |
maybe another change,
on the windows package.json change windows doesn't support . for current directory needs to start
|
This works fine on Windows. Windows development with MM isn't great but I do at least some of my development there, and this works fine. You just can't have the |
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.
I am fine with the changes. Would love to hear from @sdetweil if we can merge it or if there is still issues with the windows notation?
It's been a week, where are we at on this? Still waiting on @sdetweil? |
sorry been swamped will do tonight |
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.
looks ok.. windows start is ok (tested)
lot of things I would change, don't have time now.
npm start doesn't work over ssh.. not true, we fixed that ages ago
(3 of the 4 in this section are not true)
development guide.. the last section on creating node app doesn't apply to MM.
debugging
The [MMM-Logging](https://github.com/shbatm/MMM-Logging) module can help to gather logs and output to a file, but at a performance cost.
should used MMRIZE's MMM-LogExt much better.. MMM-Logging not updated in forever
@sdetweil thanks, I'll make some tweaks today |
@jkriegshauser are those tweaks still in progess? or whats the status of this PR in your opinion? |
Resolves MagicMirror issue MagicMirrorOrg/MagicMirror#3252
Renames development to module-development and adds new directory core-development with some info.