add feature to control buffered log, include filter and buffer cap

Did you mean to write
```js
// set to log info messages
```
here?