-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Bug: loggelf
in lib/errors.js
is not overridable
#768
Comments
Yes this is a bug, because even if logger is disabled, and if Line 23 in 7daa0e3
|
Hello! Sorry, so what do you want to add? A programmatic way to disable console output for errors? Or just to make it configurable programmatically in the code itself? That is, pass some options object in the code itself? |
Yes a programmatic way to disable console output or pass a custom logger @NickOvt otherwise it's not obvious how to disable this unwanted output. |
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 15 days. |
bump |
Currently several parts of the codebase have this line:
This requires this module: https://github.com/nodemailer/wildduck/blob/master/lib/errors.js
Specifically this code
wildduck/lib/errors.js
Lines 75 to 90 in 7daa0e3
When
errors.notifyConnection(this.this, err);
is called throughout the codebase, it uses this defaultloggelf
and outputs to console:This uses
wild-config
and it is documented herewildduck/docs/in-depth/operating-wildduck.md
Line 5 in 7daa0e3
There's no way to disable this programmatically, as it has to be read from a config file:
wildduck/config/default.toml
Lines 59 to 66 in 2019fd9
I suppose we can create a
config/default.toml
file with this override:However I feel like this should be configurable via code
options
, e.g. when passedlogger
option or viaserver.loggelf
.Curious your thoughts, right now this causes unwanted output in the console for those of us using WildDuck components programmatically.
The text was updated successfully, but these errors were encountered: