Skip to main content

logstitch (Python)

structlog 기반 통합 로깅 SDK. logging-spec/ 스키마를 따르는 compact NDJSON을 stdout으로 출력한다.

이전 이름: logstitch — pip install logstitch으로 설치한 코드는 그대로 동작합니다. 새 코드는 logstitch를 사용하세요.

설치

pip install logstitch        # 또는 uv add logstitch
# OpenTelemetry 자동 trace correlation이 필요하면:
pip install "logstitch[otel]"  # 또는 uv add "logstitch[otel]"

사용

from logstitch import get_logger

log = get_logger(__name__)

log.info(
    "payment completed",
    event_name="payment.completed",
    payment_id="p-123",
)
  • @timestamp, service.*, deployment.environment, trace.id, span.id는 자동 주입
  • log.exception(...) → error.type / error.message / error.stack_trace + event.outcome=failure
  • PII 필드(password, access_token 등)는 자동 [REDACTED]

호환성:

# 기존 코드도 동작 (DeprecationWarning 발생)
from logstitch import get_logger

설정 (환경변수)

변수 기본값
LOG_SERVICE_NAME / OTEL_SERVICE_NAME unknown-service
LOG_SERVICE_VERSION 0.0.0
DEPLOYMENT_ENVIRONMENT / APP_ENV dev
LOG_LEVEL INFO

테스트

uv run --package logstitch pytest -q

Metadata

Release files for logstitch 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logstitch 0.1.0
File Size Uploaded Provenance Actions
logstitch-0.1.0.tar.gz 12.2 kB Without provenance Details for logstitch-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for logstitch 0.1.0
File Interpreter ABI Platform Actions
logstitch-0.1.0-py3-none-any.whl Python 3 none any Details for logstitch-0.1.0-py3-none-any.whl

Total release size: 23.6 kB

Release files / logstitch-0.1.0.tar.gz

Download URL logstitch-0.1.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dfdc4542258093267b68d8f115425f7e97926dff10f190a2e4db7ee86e500e10
BLAKE2b-256 checksum
How to use checksums
1b64eb4b90e3aa5eb47db9822918b375fe09f87d66f3a988d7ae28f193fd9c18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.6

Release files / logstitch-0.1.0-py3-none-any.whl

Download URL logstitch-0.1.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12de6d7a720b8b5659e5ec2485a70913adb9ae7a261964522db09029bf0affb8
BLAKE2b-256 checksum
How to use checksums
15d133abf72288eede23fd7d11689d3f1c655046aa3e200856d2420ca9b7c8ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.6

Security for logstitch 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page