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.3.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

logrepl-0.1.3-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: logrepl-0.1.3.tar.gz
  • Upload date:
  • Size: 6.5 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.3.tar.gz
Algorithm Hash digest
SHA256 4d265adb1633e4ad7e1397c6e4bde17ae27c3a1de8afaea66e0b08dd8d8688b9
MD5 27862997dad83a423f986be17e4dcc5c
BLAKE2b-256 34205e5d32974c6b5da9bc1f2e3f93671d23ab7030fd429fec1ae1a47cb0922b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: logrepl-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 971597868f1acb8465b0e8cacee0ccb52b24e0761432b719aa9dca0f2dad1185
MD5 6a4bd309e1b3812587e1a7d282018c37
BLAKE2b-256 d8fe2d6e4976c1a085f7b098d43f24cf5512575fdbb7d7edeee10b1053405b14

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