pip install LogsHub copy .env to root directory of the project or if you have .env file already copy content of the file (new variables in the .env)
We have 4 types of logs:
- warning
- error
- critical
- info
For each function we have five parameters three of them are required and the others are optional
- message (*)
- level (*)
- application (*)
- user_id
- extra_data
The file contains the path of logs file and code for each level
import LogsHub
- LogsHub.warning("MESSAGE","NEWS",3,{"key":"value"});
- LogsHub.error("MESSAGE","NEWS",3);
- LogsHub.info("MESSAGE","NEWS");
- LogsHub.critical("MESSAGE","NEWS",None,{"key":"value"});
Odai Atef Free to use