-
Notifications
You must be signed in to change notification settings - Fork 67
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
Nolog #71
Nolog #71
Conversation
Thank you for the PR. I believe that when you put the logger inside the class, there will be issues with multiple loggers having the same name. For instance, if you create multiple instances of different PolyFuzz classes, multiple copies of loggers would be run. |
There are no multiple loggers with the same name. Two loggers with the same name are the same logger, just assigned to two different variables. This is why it's called |
I'll have to test it first before merging. I remember there being an issue with initializing it within the class itself but I am not sure. I might have some time for it this week. |
I just tried it out and I get indeed duplicate logging when I use your PR. When I install your PR and run the following, I get duplicate logging: from polyfuzz import PolyFuzz
from_list = ["apple", "apples", "appl", "recal", "house", "similarity"]
to_list = ["apple", "apples", "mouse"]
model = PolyFuzz("TF-IDF", verbose=True)
model.match(from_list, to_list)
model1 = PolyFuzz("TF-IDF", verbose=True)
model1.match(from_list, to_list)
model2 = PolyFuzz("TF-IDF", verbose=True)
model2.match(from_list, to_list) However, this is not the case when I just do |
We add a new handler only if the logger doesn't already have one
fixed |
@MaartenGr I fixed the bug |
@raffaem Thanks for the fix. I will have to test it out later this week or next. |
No description provided.