Skip to content
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

Issues with logging class #222

Open
mrmutator opened this issue May 16, 2019 · 1 comment
Open

Issues with logging class #222

mrmutator opened this issue May 16, 2019 · 1 comment

Comments

@mrmutator
Copy link

The class zemberek.core.logging.Log is a bit aggressive that makes it difficult to use Zemberek in other environments, e.g. in a web server.

In particular, it registers a console logger, it registers JVM shutdown hooks and it overwrites the JVM uncaught exception handler. The last point is particularly aggressive and should be avoided in a library that is called from other projects.

Ideally, the actions mentioned above should be moved into a separate init() method that could be called if necessary. Similarly, there should be a shutdown method that undoes those actions.

@ahmetaa
Copy link
Owner

ahmetaa commented May 18, 2019

I agree that it is too aggressive. I wrote Zemberek logger because I wanted something simple but it went out of control for some time. Perhaps using a mainstream logger might have been a better choice but as it was used in so many places I did not bother. Actually removing JVM uncaught exception handler is fine for me, I would be glad if you send a pull request. If you cant, I will handle it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants