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

Configurable polling timeout and bugfix in watch.browser #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Messj1
Copy link

@Messj1 Messj1 commented Apr 3, 2021

Closes #52, fixes #55 and fixes #56
[FEATURE] add poll_time config option to change interval timeout
[FEATURE] add bounds for poll_time to prevent unhandy config values
[BUGFIX] add a Set to prevent starting multiple interval on already watched ulog instances
[BUGFIX] add ulog after hook to update config immediately after loading all mods

[FEATURE] add bounds for poll_time to prevent unhandy config values
[BUGFIX] add a Set to prevent starting multiple interval on already watched ulog instances
[BUGFIX] add ulog after hook to update config immediately after loading all mods
@Messj1
Copy link
Author

Messj1 commented Apr 3, 2021

@Download Have you any idea why the after hook in this pull request does change the level output function to console.log?

I know, a pull request should only focus on one aspect, but the 3 Issues seems to be related on the same time synchronous problem. 🙈

@Messj1
Copy link
Author

Messj1 commented Apr 4, 2021

@Download This error seems to be a problem in the test case. The config of ulog contains {log: 'pass'} so the log level become NaN which is true 😁

The question now: Why are the configs log and test either 'ok' or 'pass'?

I added some console outputs in mods/config/index.js:

update: function(ulog) {
  ...
  var changed = update(ulog.config, newCfg)
  console.log("changed: ", changed);
  ...
},

...

after: function (logger) {
  console.log("after [logger.level]: ", logger.level);
  config.update(this);
  console.log("after [logger.level]: ", logger.level);
}

Console output:

after [logger.level]:  3
changed:  [
  { name: 'test', old: 'ok', new: 'pass' },
  { name: 'log', new: 'pass' },
  { name: 'log_output', new: 'console;test=drain' }
]
after [logger.level]:  NaN

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