Skip to main content

A simple utility to tee stdout and stderr to a logfile.

Project description

tee-logfile

Small Python utility to duplicate process output to a logfile while preserving console output (similar to Unix tee).

Features

  • Mirror stdout (and optionally stderr) to a file and the console.
  • Lightweight and easy to integrate into scripts or pipelines.
  • Designed for use on macOS and other Unix-like systems.

Requirements

  • Python 3.9+

Installation

pip install tee-logfile

Usage

from tee_logfile import Tee

with Tee.context('/path/to/output.log'):
    my_cli_code_to_run()

Development

release

poetry version minor
tox -e release
pip install ~/projects/sandbox/tee-logfile

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

tee_logfile-0.3.6.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

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

tee_logfile-0.3.6-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file tee_logfile-0.3.6.tar.gz.

File metadata

  • Download URL: tee_logfile-0.3.6.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Darwin/24.6.0

File hashes

Hashes for tee_logfile-0.3.6.tar.gz
Algorithm Hash digest
SHA256 fc1c14ddfa7a4c5d5ac443d47bb45548080897b3bcfbb57c762c764cba5a3b9b
MD5 6c768f9678cace10cd63f8d7d1cc06ee
BLAKE2b-256 100dd85e2f57359c4aacd831cc5d4f64ef991a91f647d26ac0697d69e911b1f8

See more details on using hashes here.

File details

Details for the file tee_logfile-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: tee_logfile-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Darwin/24.6.0

File hashes

Hashes for tee_logfile-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 729aab0be0616fca55691f92240b5bdefa1d3a431560788c53fc008346428f4c
MD5 1585c46c17a87fa202dff42f5c750cd5
BLAKE2b-256 a5fb0adf027320c611a4e0cdd1103744f536f0ce2c2bbc90804f540cd43d4435

See more details on using hashes here.

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