forked from ydf0509/nb_log
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yangdefeng
committed
Nov 18, 2021
1 parent
7b06479
commit 5fc3829
Showing
4 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: 当前文件", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal", | ||
"env": { | ||
"PYTHONPATH": "F:/coding2/nb_log;${env:PYTHONPATH}" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
print('导入nb_log之前的print是普通的') | ||
|
||
import sys | ||
print(sys.path) | ||
|
||
from nb_log import get_logger | ||
|
||
logger = get_logger('lalala',log_filename='jinzhifengzhuang.log',formatter_template=5) | ||
|
||
logger.debug(f'debug是绿色,说明是调试的,代码ok ') | ||
logger.info('info是天蓝色,日志正常 ') | ||
logger.warning('黄色yello,有警告了 ') | ||
logger.error('粉红色说明代码有错误 ') | ||
logger.critical('血红色,说明发生了严重错误 ') | ||
|
||
print('导入nb_log之后的print是强化版的可点击跳转的') | ||
|
||
|
||
|
||
#raise Exception("dsadsd") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters