Bunsly / JobSpy

Jobs scraper library for LinkedIn, Indeed, Glassdoor & ZipRecruiter
https://usejobspy.com
MIT License
555 stars 109 forks source link

feat: Adjust log verbosity via verbose arg #128

Closed VitaminB16 closed 3 months ago

VitaminB16 commented 3 months ago

I often don't want any logs printed when the code is executed, so being able to control the verbosity is useful for me.

cullenwatson commented 3 months ago

I believe you can do this by just

import logging
logger = logging.getLogger('JobSpy')
logger.setLevel(logging.WARNING)

I set it to INFO level as I believe for most people they would rather see it by default.

VitaminB16 commented 3 months ago

That's a fair point and it works, I just thought it would be useful to have a verbose parameter in a similar way to how some other libraries implement this

cullenwatson commented 3 months ago

I see, what libraries do this?

ZacharyHampton commented 3 months ago

I agree with OP here, implementing a verbose parameter or setting the default to not be verbose would be better, as the module is likely simply used to get data, then using it standalone, insinuating someone wanting logs.

VitaminB16 commented 3 months ago

I see it mostly in ML libraries where the printouts can be massive, e.g. XGBoost, Tensorflow, scikit-learn

cullenwatson commented 3 months ago

makes sense