Skip to content

Configurable polling timeout and bugfix in watch.browser #58

Open
Messj1 wants to merge 2 commits intoDownload:masterfrom
Messj1:52-Configurable_polling_timeout
Open

Configurable polling timeout and bugfix in watch.browser #58
Messj1 wants to merge 2 commits intoDownload:masterfrom
Messj1:52-Configurable_polling_timeout

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

Development

Successfully merging this pull request may close these issues.

Dynamic config is too late Config polling interval does not stop on resetting config Configurable polling timeout in watch.browser

1 participant