Skip to content

Do not console.warn non-sense Error #744

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

Closed
wants to merge 1 commit into from

Conversation

ayanamist
Copy link
Contributor

console.warn in lib/PoolCluster.js is useless, for it does not tell me which node is suffering error and the details of the node.
Instead, we should emit a "warn" event with pool, which is much more useful. Anyone who concerns about these messages can handle it themselves.

Instead, emitting a "warn" event with pool is much more useful.
@ayanamist
Copy link
Contributor Author

Is there anyone can review this? Or giving out other solutions to get rid of these meaningless console.warn is acceptable.
cc @felixge

@dougwilson
Copy link
Member

Sorry, I've been avoiding this because I've never used PoolCluster myself. I agree that console.warn is garbage and just noise. I'm not sure if .emit('warn') is any better, though. It looks like the point of the warning is to know when the connections are failing but it can retry the connections.

I'll have to look into the PoolCluster a bit more, but i.m.o. the error should never surface until all retries are exhausted.

@ayanamist
Copy link
Contributor Author

@dougwilson Any solutions to get rid of console.warn is welcome. I just try to keep the original design so using .emit('warn').

@dougwilson
Copy link
Member

No one says the original design was good :)

@dougwilson dougwilson added this to the 2.2 milestone Apr 8, 2014
@dougwilson dougwilson self-assigned this Apr 8, 2014
dougwilson added a commit that referenced this pull request Apr 22, 2014
dveeden pushed a commit to dveeden/mysql that referenced this pull request Jan 31, 2023
* Fix error message for unsupported isolation level.

It was "mysql: unsupported isolation level: \a"
due to wrong conversion from int to string.

See also golang/go#23632

* Add myself and sort authors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants