Skip to content

Conversation

@jalamprea
Copy link

@jalamprea jalamprea commented Dec 8, 2022

Add support to enable/disable the debug to use the console.info messages.
By default the debug is false, but in case the user sends true in the options, it will show the console messages.

Also removed some unneeded async keywords.

This is to solve #12

@CLAassistant
Copy link

CLAassistant commented Dec 8, 2022

CLA assistant check
All committers have signed the CLA.

* @return {Promise<boolean>} Resolves to true if there was data in the buffer to send.
*/
async flush() {
flush() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would keep async here because of the return false; line

}
this.resize(options && options.bufferSize ? options.bufferSize : DEFAULT_BUFFER_SIZE);
this.reset();
this.debug = options.debug || false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|| false likely does nothing.

this line could look like this instead:

this.debug = options && options.debug; 
@glasstiger
Copy link
Collaborator

Closing this PR because now we have the option to pass a custom logger to the client.

@glasstiger glasstiger closed this Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants