Skip to main content

Trajectory-日志管理工具

shields_version shields_license shields_author shiedls_python

fichesymbol

介绍

  • 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图: trajectoryuml

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shihua-trajectory-0.1.tar.gz (45.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shihua_trajectory-0.1-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

Details for the file shihua-trajectory-0.1.tar.gz.

File metadata

  • Download URL: shihua-trajectory-0.1.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for shihua-trajectory-0.1.tar.gz
Algorithm Hash digest
SHA256 f0d176ebfe621a672909e500058e3e8fa0f554584b4d7fee510962523f073baf
MD5 8bc42b7db11bec6fc15cf3b684ba8ae3
BLAKE2b-256 b4f5904db88c33274ec87e909637b7df55a8e9399a5b4a9ba8c10509122b0f0f

See more details on using hashes here.

File details

Details for the file shihua_trajectory-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for shihua_trajectory-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aec03ff77933ab4a31a7ada71e855640bd268a6bd85c2d197e7eacda2afed786
MD5 e7404b182362092cffcf799d640f94d9
BLAKE2b-256 fc14ca6470376c2c4eb2f1c4e74cb873157f8ad2d42d0958fcd941ea719f9790

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page