-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add exception levels #24
Comments
Hi @iGitScor. I can take this work if no one else is currently working on it. I'll do some research first and discuss with you about the approach to do it. Thanks |
Hi @YQBird, Nobody has started working on it, so yes you can take this. Thank you |
@iGitScor. My understanding here is that if plugin fails, the webpack build will still work in None & Log level. Only warning or log file is created. Is this correct? |
Yes, that's correct. The main complexity will be to handle rights to write logs. In the future we'll can potentially add clean log feature. |
Hi @iGitScor. I'm thinking two approach here. The first one is to use process global object to catch the uncaught exception. When this event happens, a callback will be called to log or write log to file. |
Hi, I briefly read the documentation of Winston package and it seems to fit our need and the package is enough mature to be integrated. I am not 100% sure but I would choose for the second solution. |
Hi. I personally prefer second approach as well. I'll start to work on that. |
hi @iGitScor. Being really busy recently. I did some attempt to get exception level from constructor but find it's very difficult to get that argument and use it. I'm think to config exception level as a process.env variable, then use this variable in the core file. Any advice here ? |
Hi,
do not hesitate to share gist to illustrate your difficulties. I was thinking of this approach |
Hi @iGitScor, here is what I have tried with this issue. https://github.com/YQBird/webpack-content-replacer-plugin/tree/add_exception_level. But I don't find a way to properly setting the log and do the testing yet. I am thinking if it is overkill to use winston for this issue. I will try to use NodeJS process object to solve this. Will keep you update. |
Hi @YQBird, what do you mean ?
|
Hi,
this plugin should have several exception levels
Exceptions
When an exception is caught, all the webpack build failed.
It should be nice if we could configure this behavior
Exception level
none level
)Not forgive to add test
Thank you
The text was updated successfully, but these errors were encountered: