Skip to content

Commit f99ad61

Browse files
committed
fix: docs
1 parent 5eff5d0 commit f99ad61

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

docs/cdps/config/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sidebar_position: 2
1111
version: 1 # config 版本號
1212

1313
# "DEBUG" , "INFO" , "WARN" or "ERROR"
14-
log_level: "DEBUG" # 日誌紀錄級別
14+
log_level: "DEBUG" # 日誌紀錄等級
1515

1616
log_save_days: 7 # 日誌保留天數
1717
```

docs/cdps/more/index.mdx

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ sidebar_position: 7
1212
- [Inject 注入](./inject.mdx)
1313
- [完全載入](./focus-load.mdx)
1414
- [優先載入](./pre-load.mdx)
15-
- [版本管理](./version.mdx)
15+
- [版本管理](./version.mdx)
16+
- [依賴關係](./dependencies.mdx)
17+
- [PyPI 依賴](./pip.mdx)
18+
- [日誌紀錄](./log.mdx)
19+
- [導入 依賴擴充 的 函數](./plugin.mdx)

docs/cdps/more/log.mdx

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
sidebar_position: 10
3+
---
4+
5+
# 日誌紀錄
6+
- 輸出 日誌 到 控制台 並 紀錄到 文件 中。
7+
8+
## 用法
9+
- 獲取 log 實例
10+
:::tip
11+
- Log 類 為 `單例` ,因此可以重複獲取,無需擔心重複。
12+
:::
13+
```py
14+
from cdps.utils.logger import Log # 導入 Log 類
15+
log = Log() # 獲取 log 實例
16+
log.logger.debug("除錯")
17+
log.logger.info("資訊")
18+
log.logger.warning("警告")
19+
log.logger.error("錯誤")
20+
```

docs/cdps/more/plugin.mdx

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
sidebar_position: 11
3+
---
4+
5+
# 導入 依賴擴充 的 函數
6+
- 導入 所需依賴 中的 函數

0 commit comments

Comments
 (0)