Skip to main content

Logging utilities for the SciTeX ecosystem

Project description

scitex-logging

Logging utilities for the SciTeX ecosystem.

Interfaces: Python ⭐⭐⭐ (primary) · CLI — · MCP — · Skills ⭐⭐ · Hook — · HTTP —

Problem and Solution

# Problem Solution
1 stdlib logging has only 5 levels -- experiment scripts want a distinct SUCCESS and FAIL signal that stands out in grep SUCCESS + FAIL levels added -- color-coded, level-aware handlers; drop-in compatible with getLogger(__name__)
2 raise ValueError("shape mismatch") loses context -- every package rolls its own exception hierarchy 30+ typed exceptions -- SciTeXError root + ShapeError, DTypeError, ConfigKeyError, PDFDownloadError, ...; isinstance(e, DataError) catches the whole class
3 Tee stdout-to-file is a recipe -- every script implements it differently Tee("run.log") context-manager -- one import, no boilerplate

Installation

pip install scitex-logging

Usage

import scitex_logging

# Configure logging
scitex_logging.configure(level=scitex_logging.INFO, enable_file=True)

# Get a logger
import logging
logger = logging.getLogger(__name__)
logger.info("Hello from SciTeX logging")

# Tee stdout/stderr to log files
import sys
sys.stdout, sys.stderr = scitex_logging.tee(sys)

# Custom error classes
from scitex_logging import SciTeXError, SaveError

# Warning utilities
from scitex_logging import warn_deprecated, warn_performance

# LLM session log parsing
log = scitex_logging.llm.load("session.jsonl")
log.summary()
log.render("out.html")

License

AGPL-3.0 -- see LICENSE.

Project details


Download files

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

Source Distribution

scitex_logging-0.1.2.tar.gz (81.4 kB view details)

Uploaded Source

Built Distribution

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

scitex_logging-0.1.2-py3-none-any.whl (67.9 kB view details)

Uploaded Python 3

File details

Details for the file scitex_logging-0.1.2.tar.gz.

File metadata

  • Download URL: scitex_logging-0.1.2.tar.gz
  • Upload date:
  • Size: 81.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_logging-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e03b5951ba2387d3618ce8ced476e666b9bfd8f5bda4efd34f153124f5ecf813
MD5 bcd37bdc47572d333fefeec7feca9a08
BLAKE2b-256 5dc7aa01660f851e5d91024a0afd9ddaff2535cfd0068f62e9e1ec9956dad0dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_logging-0.1.2.tar.gz:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-logging

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_logging-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: scitex_logging-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 67.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_logging-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7eac0d7ab2e5e60dbfcda170a2a46330f9204d8099bd8d16c5505da3e6bf131b
MD5 3c7dfcd368604a1f59277587db48f619
BLAKE2b-256 96ea46c068663c68bd71d0705d95000672f3b771c6f675024cbb952853abcff1

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_logging-0.1.2-py3-none-any.whl:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-logging

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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