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('output.log'):
    my_cli_code_to_run()

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.4.tar.gz (1.4 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.4-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tee_logfile-0.3.4.tar.gz
  • Upload date:
  • Size: 1.4 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.4.tar.gz
Algorithm Hash digest
SHA256 d25f231e9abd0b1341b8f885f412e42101e5774fdc0bf87d003b1f409485d2b1
MD5 5ab8ad8e1ce3ede5cd6be2816f0551fb
BLAKE2b-256 d98e4dc3c1610e4c7377565d1e9fa330f158681be52c8fe3bdfa069fae56f448

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tee_logfile-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 2.0 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 38845a1ad29e74190f0b42e6acdc1e5f5dd78a2462275db9cf8481a00f5d4859
MD5 41c3188aa1a31bfc91c5e09fc563a32c
BLAKE2b-256 3b4f1b5645a6d06656133a160a4ba9ea05f86386eb492302a3773995bfeb4b0f

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