EdupageAPI / edupage-api

A python library for accessing your Edupage account
https://edupageapi.github.io/edupage-api/
GNU General Public License v3.0
67 stars 13 forks source link

disable empty type in notifications #35

Closed Kubk0 closed 2 years ago

Kubk0 commented 2 years ago

Is there a way that i can disable the "[WARNING] Found notification with empty type, skipping..." messages and still get the text of the notification?

ivanhrabcak commented 2 years ago

You can pass the log_level argument when creating the Edupage object like this:

from edupage import LogLevel

# ...

edupage = Edupage("school", "username", "password", log_level=LogLevel.NONE)

This will disable all logging by edupage_api

Please close this issue if my comment helped you.

Kubk0 commented 2 years ago

Can i still get the notification text if i disable just the logging?

BelKed commented 2 years ago

Yes, you can. log_level=LogLevel.NONE disables DEBUG, WARNING and ERROR messages from edupage-api, and it doesn't influence other behaviour.