File tree 4 files changed +32
-2
lines changed
4 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ sidebar_position: 2
11
11
version : 1 # config 版本號
12
12
13
13
# "DEBUG" , "INFO" , "WARN" or "ERROR"
14
- log_level : " DEBUG" # 日誌紀錄級別
14
+ log_level : " DEBUG" # 日誌紀錄等級
15
15
16
16
log_save_days : 7 # 日誌保留天數
17
17
` ` `
Original file line number Diff line number Diff line change @@ -12,4 +12,8 @@ sidebar_position: 7
12
12
- [ Inject 注入] ( ./inject.mdx )
13
13
- [ 完全載入] ( ./focus-load.mdx )
14
14
- [ 優先載入] ( ./pre-load.mdx )
15
- - [ 版本管理] ( ./version.mdx )
15
+ - [ 版本管理] ( ./version.mdx )
16
+ - [ 依賴關係] ( ./dependencies.mdx )
17
+ - [ PyPI 依賴] ( ./pip.mdx )
18
+ - [ 日誌紀錄] ( ./log.mdx )
19
+ - [ 導入 依賴擴充 的 函數] ( ./plugin.mdx )
Original file line number Diff line number Diff line change
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
+ ```
Original file line number Diff line number Diff line change
1
+ ---
2
+ sidebar_position : 11
3
+ ---
4
+
5
+ # 導入 依賴擴充 的 函數
6
+ - 導入 所需依賴 中的 函數
You can’t perform that action at this time.
0 commit comments