Skip to main content

By this command line tool, you can run a python repl which logs everying into a file.

Project description

Usage

Install:

pip install logrepl

run the repl:

pylogrepl

then the whole repl will be logged to the file yyyymmddhhmm.log.

Config

Prefix of the log file

use the optional positional argument, for example:

pylogrepl prefix

then the log file will be prefix_yyyymmddhhmm.log.

Dir to save the logs

use the -d or --dir options:

pylogrepl -d logs
pylogrepl --dir logs

then the log file will be in the logs directory.

By .pylogrepl file

You can also sepcify the prefix & the directory by making a .pylogrepl in the working directory:

dir=logs
prefix=my_prefix

note that the command line arguments are prioritized over the settings in .pylogrepl. We suggest that specifying dir in .pylogrepl and prefix by command line argument is a handy approach.

Notes

Exceptions ocurred when writing to the log file will not be logged since it'll lead to infinite loop.

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

logrepl-0.1.5.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

logrepl-0.1.5-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file logrepl-0.1.5.tar.gz.

File metadata

  • Download URL: logrepl-0.1.5.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/5.15.146.1-microsoft-standard-WSL2

File hashes

Hashes for logrepl-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1ce87ca74cb45f766ff4f9fab3435ae557427e0e3be30aca785b2782f472fbe2
MD5 f3adb7ef1f69fde6fce40a62f1b6e5db
BLAKE2b-256 fd620555325f2eead84c1d7fdd76c81574145bf1c0853b4b164c8484b5b217bd

See more details on using hashes here.

File details

Details for the file logrepl-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: logrepl-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/5.15.146.1-microsoft-standard-WSL2

File hashes

Hashes for logrepl-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0e240d7c31c7e5e6fc6796fc6bca2defa0b9260c5c83072493dc565a8f566c14
MD5 e913d28a75b4cf0480a39e9a33871470
BLAKE2b-256 0caa42f5a52727351503cf95a82aa9fe03d75e741e00d3ade41d79a91a7d07e3

See more details on using hashes here.

Supported by

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