mirror of
https://github.com/PaiGramTeam/paigram-logger.git
synced 2024-11-23 08:11:06 +00:00
📝 Update README.md
This commit is contained in:
parent
dc311e1ea8
commit
cb0bc9e6f1
30
README.md
30
README.md
@ -1,2 +1,32 @@
|
||||
# paigram-logger
|
||||
A logger for PaiGram's projects.
|
||||
|
||||
## 使用方法
|
||||
|
||||
### 使用默认配置
|
||||
|
||||
```python
|
||||
from pg_logger import Logger
|
||||
|
||||
logger = Logger()
|
||||
|
||||
logger.info("info log")
|
||||
logger.success("success log")
|
||||
```
|
||||
|
||||
### 自定义配置 Logger
|
||||
|
||||
```python
|
||||
from pg_logger import Logger, LoggerConfig
|
||||
|
||||
logger = Logger(
|
||||
LoggerConfig(
|
||||
width=120,
|
||||
keywords=['GET', 'PUT', 'POST']
|
||||
)
|
||||
)
|
||||
|
||||
logger.info("[GET] info log")
|
||||
logger.success("[PUT] success log")
|
||||
|
||||
```
|
Loading…
Reference in New Issue
Block a user