liwancai-PyLog 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- liwancai_pylog-1.0.0/LOG/__init__.py +10 -0
- liwancai_pylog-1.0.0/LOG/core.py +149 -0
- liwancai_pylog-1.0.0/PKG-INFO +108 -0
- liwancai_pylog-1.0.0/README.md +84 -0
- liwancai_pylog-1.0.0/liwancai_PyLog.egg-info/PKG-INFO +108 -0
- liwancai_pylog-1.0.0/liwancai_PyLog.egg-info/SOURCES.txt +9 -0
- liwancai_pylog-1.0.0/liwancai_PyLog.egg-info/dependency_links.txt +1 -0
- liwancai_pylog-1.0.0/liwancai_PyLog.egg-info/requires.txt +6 -0
- liwancai_pylog-1.0.0/liwancai_PyLog.egg-info/top_level.txt +1 -0
- liwancai_pylog-1.0.0/pyproject.toml +47 -0
- liwancai_pylog-1.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
PyLog - 一个基于 logbook 的彩色日志库
|
|
4
|
+
Created on Fri Apr 10 20:07:00 2019
|
|
5
|
+
Created on Python3.6.8
|
|
6
|
+
@author: liwancai
|
|
7
|
+
QQ:248411282
|
|
8
|
+
Tel:13199701121
|
|
9
|
+
"""
|
|
10
|
+
import os
|
|
11
|
+
import sys
|
|
12
|
+
from datetime import datetime
|
|
13
|
+
import logbook
|
|
14
|
+
from logbook.more import ColorizedStderrHandler
|
|
15
|
+
from logbook import Logger, TimedRotatingFileHandler
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
LEVEL_MAP = {
|
|
19
|
+
'TRACE': logbook.TRACE,
|
|
20
|
+
'DEBUG': logbook.DEBUG,
|
|
21
|
+
'INFO': logbook.INFO,
|
|
22
|
+
'NOTICE': logbook.NOTICE,
|
|
23
|
+
'WARNING': logbook.WARNING,
|
|
24
|
+
'ERROR': logbook.ERROR,
|
|
25
|
+
'CRITICAL': logbook.CRITICAL,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def FormatLogInfo(record, handler):
|
|
30
|
+
"""格式化日志信息,添加颜色和时间戳"""
|
|
31
|
+
color_code = {
|
|
32
|
+
'INFO': '\033[92m',
|
|
33
|
+
'DEBUG': '\033[36m',
|
|
34
|
+
'ERROR': '\033[31m',
|
|
35
|
+
'CRITICAL': '\033[35m',
|
|
36
|
+
'NOTICE': '\033[38;5;208m',
|
|
37
|
+
'WARNING': '\033[33m',
|
|
38
|
+
'TRACE': '\033[37m',
|
|
39
|
+
}
|
|
40
|
+
log = "\033[0m[{dt}]{bold}{color}[{level}][{filename}][{func_name}][{lineno}]↓↓↓\n{msg}\033[0m\n{rn}".format(
|
|
41
|
+
rn="-" * 64,
|
|
42
|
+
dt=datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
|
|
43
|
+
filename=os.path.split(record.filename)[-1],
|
|
44
|
+
func_name=record.func_name,
|
|
45
|
+
level=record.level_name,
|
|
46
|
+
lineno=record.lineno,
|
|
47
|
+
bold='\033[1m',
|
|
48
|
+
color=color_code.get(record.level_name, ''),
|
|
49
|
+
msg=record.message,
|
|
50
|
+
)
|
|
51
|
+
return log
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class _Log(object):
|
|
55
|
+
"""日志管理类,提供多种日志级别的日志记录功能
|
|
56
|
+
|
|
57
|
+
支持独立设置终端日志级别和文件日志级别。
|
|
58
|
+
终端日志级别只影响控制台输出,不影响文件保存。
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
_instance = None
|
|
62
|
+
_initialized = False
|
|
63
|
+
|
|
64
|
+
def __new__(cls, *args, **kwargs):
|
|
65
|
+
if cls._instance is None:
|
|
66
|
+
cls._instance = super(_Log, cls).__new__(cls)
|
|
67
|
+
return cls._instance
|
|
68
|
+
|
|
69
|
+
def __init__(self, console_level='DEBUG', logpath=None):
|
|
70
|
+
if self._initialized:
|
|
71
|
+
return
|
|
72
|
+
self._initialized = True
|
|
73
|
+
|
|
74
|
+
if logpath is None:
|
|
75
|
+
logpath = os.path.join("./logs/")
|
|
76
|
+
self.logpath = logpath
|
|
77
|
+
if not os.path.exists(self.logpath):
|
|
78
|
+
os.makedirs(self.logpath)
|
|
79
|
+
|
|
80
|
+
self._console_handler = ColorizedStderrHandler(
|
|
81
|
+
level=LEVEL_MAP.get(console_level.upper(), logbook.DEBUG),
|
|
82
|
+
bubble=True
|
|
83
|
+
)
|
|
84
|
+
self._console_handler.formatter = FormatLogInfo
|
|
85
|
+
|
|
86
|
+
self._file_handlers = {}
|
|
87
|
+
|
|
88
|
+
self.logitems = {
|
|
89
|
+
"Info": Logger('INFO', level=logbook.INFO),
|
|
90
|
+
"Trace": Logger('TRACE', level=logbook.TRACE),
|
|
91
|
+
"Debug": Logger('DEBUG', level=logbook.DEBUG),
|
|
92
|
+
"Error": Logger('ERROR', level=logbook.ERROR),
|
|
93
|
+
"Notice": Logger('NOTICE', level=logbook.NOTICE),
|
|
94
|
+
"Warning": Logger('WARNING', level=logbook.WARNING),
|
|
95
|
+
"Critical": Logger('CRITICAL', level=logbook.CRITICAL)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
for level, logger in self.logitems.items():
|
|
99
|
+
logger.handlers.append(self._console_handler)
|
|
100
|
+
|
|
101
|
+
file_handler = TimedRotatingFileHandler(
|
|
102
|
+
date_format='%Y%m%d',
|
|
103
|
+
bubble=True,
|
|
104
|
+
filename=os.path.join(
|
|
105
|
+
self.logpath,
|
|
106
|
+
f"{os.path.splitext(os.path.basename(sys.argv[0]))[0]}_{level}.log"
|
|
107
|
+
)
|
|
108
|
+
)
|
|
109
|
+
file_handler.formatter = FormatLogInfo
|
|
110
|
+
logger.handlers.append(file_handler)
|
|
111
|
+
self._file_handlers[level] = file_handler
|
|
112
|
+
|
|
113
|
+
def set_console_level(self, level):
|
|
114
|
+
"""设置终端日志级别
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
level: 日志级别,支持字符串或整数
|
|
118
|
+
字符串: 'TRACE', 'DEBUG', 'INFO', 'NOTICE', 'WARNING', 'ERROR', 'CRITICAL'
|
|
119
|
+
整数: logbook.TRACE, logbook.DEBUG, logbook.INFO 等
|
|
120
|
+
|
|
121
|
+
示例:
|
|
122
|
+
log.set_console_level('INFO') # 只显示 INFO 及以上级别
|
|
123
|
+
log.set_console_level(logbook.WARNING) # 只显示 WARNING 及以上级别
|
|
124
|
+
"""
|
|
125
|
+
if isinstance(level, str):
|
|
126
|
+
level = LEVEL_MAP.get(level.upper(), logbook.DEBUG)
|
|
127
|
+
self._console_handler.level = level
|
|
128
|
+
|
|
129
|
+
def get_console_level(self):
|
|
130
|
+
"""获取当前终端日志级别"""
|
|
131
|
+
return self._console_handler.level
|
|
132
|
+
|
|
133
|
+
def get_console_level_name(self):
|
|
134
|
+
"""获取当前终端日志级别名称"""
|
|
135
|
+
for name, lvl in LEVEL_MAP.items():
|
|
136
|
+
if lvl == self._console_handler.level:
|
|
137
|
+
return name
|
|
138
|
+
return 'UNKNOWN'
|
|
139
|
+
|
|
140
|
+
Info = property(lambda self: self.logitems["Info"].info)
|
|
141
|
+
Trace = property(lambda self: self.logitems["Trace"].trace)
|
|
142
|
+
Debug = property(lambda self: self.logitems["Debug"].debug)
|
|
143
|
+
Error = property(lambda self: self.logitems["Error"].error)
|
|
144
|
+
Notice = property(lambda self: self.logitems["Notice"].notice)
|
|
145
|
+
Warn = property(lambda self: self.logitems["Warning"].warning)
|
|
146
|
+
Critical = property(lambda self: self.logitems["Critical"].critical)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
log = _Log()
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: liwancai-PyLog
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: 一个基于 logbook 的彩色日志库,支持多种日志级别和日志文件自动分割
|
|
5
|
+
Author-email: liwancai <248411282@qq.com>
|
|
6
|
+
Maintainer-email: liwancai <248411282@qq.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Keywords: log,logging,logbook,color,日志
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
+
Classifier: Topic :: System :: Logging
|
|
17
|
+
Requires-Python: >=3.6
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: logbook>=1.5.0
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
22
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
23
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
24
|
+
|
|
25
|
+
# PyLog
|
|
26
|
+
|
|
27
|
+
一个基于 logbook 的彩色日志库,支持多种日志级别和日志文件自动分割。
|
|
28
|
+
|
|
29
|
+
## 安装
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install PyLog
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 快速使用
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from LOG import log
|
|
39
|
+
|
|
40
|
+
log.Info("This is an info message")
|
|
41
|
+
log.Debug("This is a debug message")
|
|
42
|
+
log.Error("This is an error message")
|
|
43
|
+
log.Warn("This is a warning message")
|
|
44
|
+
log.Critical("This is a critical message")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 日志级别
|
|
48
|
+
|
|
49
|
+
| 方法 | 级别 | 颜色 |
|
|
50
|
+
|------|------|------|
|
|
51
|
+
| `Info()` | INFO | 绿色 |
|
|
52
|
+
| `Debug()` | DEBUG | 青色 |
|
|
53
|
+
| `Error()` | ERROR | 红色 |
|
|
54
|
+
| `Warn()` | WARNING | 黄色 |
|
|
55
|
+
| `Critical()` | CRITICAL | 紫色 |
|
|
56
|
+
| `Notice()` | NOTICE | 橙色 |
|
|
57
|
+
| `Trace()` | TRACE | 默认 |
|
|
58
|
+
|
|
59
|
+
## 设置终端日志级别
|
|
60
|
+
|
|
61
|
+
终端日志级别只影响控制台输出,不影响文件保存(文件始终记录所有级别)。
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
from LOG import log
|
|
65
|
+
|
|
66
|
+
# 设置终端只显示 INFO 及以上级别
|
|
67
|
+
log.set_console_level('INFO')
|
|
68
|
+
|
|
69
|
+
# 设置终端只显示 WARNING 及以上级别
|
|
70
|
+
log.set_console_level('WARNING')
|
|
71
|
+
|
|
72
|
+
# 设置终端只显示 ERROR 及以上级别
|
|
73
|
+
log.set_console_level('ERROR')
|
|
74
|
+
|
|
75
|
+
# 获取当前终端日志级别
|
|
76
|
+
print(log.get_console_level_name()) # 输出: INFO
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 日志级别优先级(从低到高)
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
CRITICAL = 15
|
|
83
|
+
ERROR = 14
|
|
84
|
+
WARNING = 13
|
|
85
|
+
NOTICE = 12
|
|
86
|
+
INFO = 11
|
|
87
|
+
DEBUG = 10
|
|
88
|
+
TRACE = 9
|
|
89
|
+
NOTSET = 0
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
设置某个级别后,只会显示该级别及更高级别的日志。
|
|
93
|
+
|
|
94
|
+
## 特性
|
|
95
|
+
|
|
96
|
+
- 控制台彩色输出
|
|
97
|
+
- 日志文件按日期自动分割
|
|
98
|
+
- 支持多种日志级别
|
|
99
|
+
- 自动创建日志目录
|
|
100
|
+
- 支持动态设置终端日志级别(不影响文件保存)
|
|
101
|
+
|
|
102
|
+
## 依赖
|
|
103
|
+
|
|
104
|
+
- logbook >= 1.5.0
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
MIT
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# PyLog
|
|
2
|
+
|
|
3
|
+
一个基于 logbook 的彩色日志库,支持多种日志级别和日志文件自动分割。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install PyLog
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 快速使用
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from LOG import log
|
|
15
|
+
|
|
16
|
+
log.Info("This is an info message")
|
|
17
|
+
log.Debug("This is a debug message")
|
|
18
|
+
log.Error("This is an error message")
|
|
19
|
+
log.Warn("This is a warning message")
|
|
20
|
+
log.Critical("This is a critical message")
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 日志级别
|
|
24
|
+
|
|
25
|
+
| 方法 | 级别 | 颜色 |
|
|
26
|
+
|------|------|------|
|
|
27
|
+
| `Info()` | INFO | 绿色 |
|
|
28
|
+
| `Debug()` | DEBUG | 青色 |
|
|
29
|
+
| `Error()` | ERROR | 红色 |
|
|
30
|
+
| `Warn()` | WARNING | 黄色 |
|
|
31
|
+
| `Critical()` | CRITICAL | 紫色 |
|
|
32
|
+
| `Notice()` | NOTICE | 橙色 |
|
|
33
|
+
| `Trace()` | TRACE | 默认 |
|
|
34
|
+
|
|
35
|
+
## 设置终端日志级别
|
|
36
|
+
|
|
37
|
+
终端日志级别只影响控制台输出,不影响文件保存(文件始终记录所有级别)。
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from LOG import log
|
|
41
|
+
|
|
42
|
+
# 设置终端只显示 INFO 及以上级别
|
|
43
|
+
log.set_console_level('INFO')
|
|
44
|
+
|
|
45
|
+
# 设置终端只显示 WARNING 及以上级别
|
|
46
|
+
log.set_console_level('WARNING')
|
|
47
|
+
|
|
48
|
+
# 设置终端只显示 ERROR 及以上级别
|
|
49
|
+
log.set_console_level('ERROR')
|
|
50
|
+
|
|
51
|
+
# 获取当前终端日志级别
|
|
52
|
+
print(log.get_console_level_name()) # 输出: INFO
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 日志级别优先级(从低到高)
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
CRITICAL = 15
|
|
59
|
+
ERROR = 14
|
|
60
|
+
WARNING = 13
|
|
61
|
+
NOTICE = 12
|
|
62
|
+
INFO = 11
|
|
63
|
+
DEBUG = 10
|
|
64
|
+
TRACE = 9
|
|
65
|
+
NOTSET = 0
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
设置某个级别后,只会显示该级别及更高级别的日志。
|
|
69
|
+
|
|
70
|
+
## 特性
|
|
71
|
+
|
|
72
|
+
- 控制台彩色输出
|
|
73
|
+
- 日志文件按日期自动分割
|
|
74
|
+
- 支持多种日志级别
|
|
75
|
+
- 自动创建日志目录
|
|
76
|
+
- 支持动态设置终端日志级别(不影响文件保存)
|
|
77
|
+
|
|
78
|
+
## 依赖
|
|
79
|
+
|
|
80
|
+
- logbook >= 1.5.0
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: liwancai-PyLog
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: 一个基于 logbook 的彩色日志库,支持多种日志级别和日志文件自动分割
|
|
5
|
+
Author-email: liwancai <248411282@qq.com>
|
|
6
|
+
Maintainer-email: liwancai <248411282@qq.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Keywords: log,logging,logbook,color,日志
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
+
Classifier: Topic :: System :: Logging
|
|
17
|
+
Requires-Python: >=3.6
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: logbook>=1.5.0
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
22
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
23
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
24
|
+
|
|
25
|
+
# PyLog
|
|
26
|
+
|
|
27
|
+
一个基于 logbook 的彩色日志库,支持多种日志级别和日志文件自动分割。
|
|
28
|
+
|
|
29
|
+
## 安装
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install PyLog
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 快速使用
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from LOG import log
|
|
39
|
+
|
|
40
|
+
log.Info("This is an info message")
|
|
41
|
+
log.Debug("This is a debug message")
|
|
42
|
+
log.Error("This is an error message")
|
|
43
|
+
log.Warn("This is a warning message")
|
|
44
|
+
log.Critical("This is a critical message")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 日志级别
|
|
48
|
+
|
|
49
|
+
| 方法 | 级别 | 颜色 |
|
|
50
|
+
|------|------|------|
|
|
51
|
+
| `Info()` | INFO | 绿色 |
|
|
52
|
+
| `Debug()` | DEBUG | 青色 |
|
|
53
|
+
| `Error()` | ERROR | 红色 |
|
|
54
|
+
| `Warn()` | WARNING | 黄色 |
|
|
55
|
+
| `Critical()` | CRITICAL | 紫色 |
|
|
56
|
+
| `Notice()` | NOTICE | 橙色 |
|
|
57
|
+
| `Trace()` | TRACE | 默认 |
|
|
58
|
+
|
|
59
|
+
## 设置终端日志级别
|
|
60
|
+
|
|
61
|
+
终端日志级别只影响控制台输出,不影响文件保存(文件始终记录所有级别)。
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
from LOG import log
|
|
65
|
+
|
|
66
|
+
# 设置终端只显示 INFO 及以上级别
|
|
67
|
+
log.set_console_level('INFO')
|
|
68
|
+
|
|
69
|
+
# 设置终端只显示 WARNING 及以上级别
|
|
70
|
+
log.set_console_level('WARNING')
|
|
71
|
+
|
|
72
|
+
# 设置终端只显示 ERROR 及以上级别
|
|
73
|
+
log.set_console_level('ERROR')
|
|
74
|
+
|
|
75
|
+
# 获取当前终端日志级别
|
|
76
|
+
print(log.get_console_level_name()) # 输出: INFO
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 日志级别优先级(从低到高)
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
CRITICAL = 15
|
|
83
|
+
ERROR = 14
|
|
84
|
+
WARNING = 13
|
|
85
|
+
NOTICE = 12
|
|
86
|
+
INFO = 11
|
|
87
|
+
DEBUG = 10
|
|
88
|
+
TRACE = 9
|
|
89
|
+
NOTSET = 0
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
设置某个级别后,只会显示该级别及更高级别的日志。
|
|
93
|
+
|
|
94
|
+
## 特性
|
|
95
|
+
|
|
96
|
+
- 控制台彩色输出
|
|
97
|
+
- 日志文件按日期自动分割
|
|
98
|
+
- 支持多种日志级别
|
|
99
|
+
- 自动创建日志目录
|
|
100
|
+
- 支持动态设置终端日志级别(不影响文件保存)
|
|
101
|
+
|
|
102
|
+
## 依赖
|
|
103
|
+
|
|
104
|
+
- logbook >= 1.5.0
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
LOG
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "liwancai-PyLog"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "一个基于 logbook 的彩色日志库,支持多种日志级别和日志文件自动分割"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
authors = [
|
|
12
|
+
{name = "liwancai", email = "248411282@qq.com"}
|
|
13
|
+
]
|
|
14
|
+
maintainers = [
|
|
15
|
+
{name = "liwancai", email = "248411282@qq.com"}
|
|
16
|
+
]
|
|
17
|
+
keywords = ["log", "logging", "logbook", "color", "日志"]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Development Status :: 4 - Beta",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"License :: OSI Approved :: MIT License",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
25
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
26
|
+
"Topic :: System :: Logging",
|
|
27
|
+
]
|
|
28
|
+
requires-python = ">=3.6"
|
|
29
|
+
dependencies = [
|
|
30
|
+
"logbook>=1.5.0",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.optional-dependencies]
|
|
34
|
+
dev = [
|
|
35
|
+
"pytest>=7.0.0",
|
|
36
|
+
"black>=23.0.0",
|
|
37
|
+
"flake8>=6.0.0",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[project.urls]
|
|
41
|
+
|
|
42
|
+
[tool.setuptools.packages.find]
|
|
43
|
+
where = ["."]
|
|
44
|
+
include = ["LOG*"]
|
|
45
|
+
|
|
46
|
+
[tool.setuptools.package-data]
|
|
47
|
+
LOG = ["py.typed"]
|