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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file logrepl-0.1.2.tar.gz
.
File metadata
- Download URL: logrepl-0.1.2.tar.gz
- Upload date:
- Size: 6.4 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10685328fd503fee0a8006602390237345b657853ce305c354cf5f3ccd252f8c |
|
MD5 | 119e19c91664b7876abbf1b84554400f |
|
BLAKE2b-256 | 55ca4b4631b7829161ee14c8ceb99c77f891e10c930278a9dce7faa3971a40e7 |
File details
Details for the file logrepl-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: logrepl-0.1.2-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 223e6aa106fbaed006d5882e62d2c6e1b4191d87ff213c49fdfd72fefba81d05 |
|
MD5 | 3d46d0c35a15316c43fe193be56e3614 |
|
BLAKE2b-256 | ead80fef9a6880a988bf3c56dde2e9d8a63dea301d40a88f1bcdfa3c9c028bd8 |