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
Don't pollute stdout with warnings and errors #1279
Comments
I'm open to making a PR along the lines of the desired solution if you agree to it. |
yes, please, use a warningLog UPDATE; in fact, i am on it. |
Many thanks! Are you also open to the first part of my question:
I think the env variable is the easiest solution, I can make a PR for that if you like. |
@everhardt debugLog are now cleaned-up. Sure, please add a mechanism to enable or disable warningLog and errorLog. |
I'm sorry for my late reply, in the end I did not need to use this package anymore, so for now I won't be contributing. |
@everhardt thank you for joining the initiative, and thank your for you contribution to the code. |
Since this has been closed as completed I assume it should now be possible to disable stdout output? If so, how to do it? I couldn't find it in the code. Is there an env variable to control the output? |
Greetings. |
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
I'd love for node-opcua to not pollute stdout. I think dependencies should not do that (by default). Listening to
messageLogger
and deal with logs there seems to be a fine alternative. This requires:OPCUAClientOptions
and the likes orprocess.env
to enable writing to stdout. The setting should be adhered to inmake_errorLog
andmake_warningLog
.console.log
calls, like:node-opcua/packages/node-opcua-client/source/private/client_base_impl.ts
Line 759 in 853d291
Additional context
N/A
The text was updated successfully, but these errors were encountered: