Trajectory-日志管理工具
介绍
- trajectory是一个日志管理工具,主要功能提供日志统一集中管理功能,主要技术基于logging提供一个mongodb的日志转发器,包括日志过滤、日志格式化功能。
安装
trajectory采用Python开发,得益于Python良好的社区环境,安装支持Pythonic风格的各种管理器。
$ pip install trajectory-0.1-xxxxxxxxxxxx.whl
快速指南
服务端使用
- trajectory提供python-sdk的日志转发器,以下是trajectory主程脚本示例:
from trajectory.handlers import *
### 创建日志操作对象
logger = logging.getLogger()
### 设置日志操作对象的日志等级
logger.setLevel(logging.INFO)
### 创建一个mongodb处理器,指定log_collection
mongohandler = MongoHandler(log_database='trajectory',log_collection='testlog')
### 设置mongodb处理器的日志等级
mongohandler.setLevel(logging.INFO)
### 向日志操作对象添加mongodb处理器
logger.addHandler(mongohandler)
logger.info('this is a info log')
logger.warning('this is a warning log')
设计
- 基于python基础包logging开发日志转发处理器
- 使用mongodb作为日志存储后端
- 支持日志过滤和日志信息选择
技术列表
- 继承重写
- 静态方法
- 对象化
- JSON
- 微服务-FastAPI
- 配置文件-yaml技术
- 数据库-MongoDB
设计UML图
以下是设计的UML图:
Metadata
Release files for shihua-trajectory 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shihua-trajectory-0.1.tar.gz | 45.4 kB | Without provenance | Details for shihua-trajectory-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shihua_trajectory-0.1-py3-none-any.whl | Python 3 | none | any | Details for shihua_trajectory-0.1-py3-none-any.whl |
Total release size: 92.9 kB
Release files / shihua-trajectory-0.1.tar.gz
| Download URL | shihua-trajectory-0.1.tar.gz |
|---|---|
| Size | 45.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0d176ebfe621a672909e500058e3e8fa0f554584b4d7fee510962523f073baf
|
|
BLAKE2b-256 checksum How to use checksums |
b4f5904db88c33274ec87e909637b7df55a8e9399a5b4a9ba8c10509122b0f0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Release files / shihua_trajectory-0.1-py3-none-any.whl
| Download URL | shihua_trajectory-0.1-py3-none-any.whl |
|---|---|
| Size | 47.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aec03ff77933ab4a31a7ada71e855640bd268a6bd85c2d197e7eacda2afed786
|
|
BLAKE2b-256 checksum How to use checksums |
fc14ca6470376c2c4eb2f1c4e74cb873157f8ad2d42d0958fcd941ea719f9790
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Security for shihua-trajectory 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.