Logging¶
A basic method of logging the lib.
logging.py¶
1from zcached import ZCached, Result
2import logging
3
4logging.basicConfig(level=logging.DEBUG)
5
6client = ZCached(host="localhost", port=1234)
7client.run()
8
9result: Result[str] = client.ping()
10
11if not result:
12 print("Error!")
13 print(result.error)
14else:
15 print("Ok!")
16 print(result.value)