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

Improve logging support in dapp #4

Open
edchat opened this issue Sep 10, 2013 · 6 comments
Open

Improve logging support in dapp #4

edchat opened this issue Sep 10, 2013 · 6 comments

Comments

@edchat
Copy link
Contributor

edchat commented Sep 10, 2013

The recent updates to the Transition controller required better logging support to allow logging of the things related to the Transition flow without all of the other logging cluttering up the log. So support was added in Transition.js to log the transition flow if an option is set in the config.json, instead of using the app: {debugApp: 1}, flag in the index.html file.

Perhaps dapp should support options like debugAppAll, debugAppTransitions, debugAppLoad, debugAppHistory? And then have debugApp by itself do debugAppAll, and have the other ones only log things if they are set true.

@ghost ghost assigned edchat Sep 10, 2013
@edchat
Copy link
Contributor Author

edchat commented Sep 11, 2013

I think it is much easier to update the applications config.json than it is to update the index.html to set things in the dojo config (like we have to do for logging in dojox/app with:

data-dojo-config="  app: {debugApp: 1}"

I would like to add an "appLogging" section into the config.json to setup the options for logging.

    "appLogging": {
        "logAll": 0, // if this is set true it is like setting  data-dojo-config="  app: {debugApp: 1}
        "logTimeStamp": 1, // add a timestamp to each log message
        // entries in the loggingList array will be used to see if specific log messages should be logged
        // by checking to see if the first arg matches an entry in the array when logAll is false 
        "loggingList": [ 
            "logAppTransitions"
        ]
    },

We should also move the logging code out of main.js and into a logger.js in util, or have it be a customizable via the config as well so that the app can extend or replace the logger if necessary.

@edchat
Copy link
Contributor Author

edchat commented Sep 12, 2013

Need to look at the logger support in cordova to be sure that dapp logging is consistent with that, and that it is possible to log to the cordova logger with a config setting.

@cjolif
Copy link
Contributor

cjolif commented May 2, 2014

debugAppAll, debugAppTransitions, debugAppLoad, debugAppHistory

sounds a lot flags .. what about a single flag which would take several values?

@edchat
Copy link
Contributor Author

edchat commented May 2, 2014

Ok, I will plan to remove the inline logging and setup the logging controller to cover the logging by watching for relevant events and logging them.

@edchat
Copy link
Contributor Author

edchat commented Jun 18, 2014

The inline logging was removed, and a new event based Logger controller was created with this commit db863da
The only flag used now is "appLogging": {"logAll": 1} but we may want to add additional flags to only log specific things.

@edchat
Copy link
Contributor Author

edchat commented Jul 9, 2014

Add logging for the history support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants