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

Collection Printing #3

Open
boxman0617 opened this issue Feb 28, 2017 · 0 comments
Open

Collection Printing #3

boxman0617 opened this issue Feb 28, 2017 · 0 comments
Assignees
Labels

Comments

@boxman0617
Copy link
Owner

Story

User should be able to add a key/value store into the logger that would allow a collection of values to be accumulated before printing without adding "debugger" code.

Example:

log.watch('myList', []);
for (let i = 0; i < 10; i += 1) {
    const result = WebApp.doStuff(myList, i);
    log.update('myList', (list) => {
        list.push(result);
        return list;
    });
    WebApp.doOtherStuff(result);
}
log.flushWatch('myList');

Suggested additions:

  • Make a single flush or the entire flush functions debug flag dependent.
  • Make update method understand a few preset actions like pushing to an array or updating a value
@boxman0617 boxman0617 self-assigned this Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant