Tiny and minimalistic logging utility
Project description
Tiny and minimalistic logging utility module.
Lode is designed to be used in the case where normally simple print statement style debugging would be useful, like checking whether or not a section of code is executed, but stdout or stderr has been robbed from you by something like a devilishly clever test framework. Rather than try to uncover which dark alleyway your calls to print end up, lode just outputs it to a friendly file.
Lode is tested and supported on python versions 2.6, 2.7, 3.2, 3.3 and 3.4.
Installing
Lode can be installed with pip:
$ pip install lode
Or from source:
$ git clone https://github.com/kragniz/lode.git
$ cd lode
$ python setup.py install
Using this thing
For the most basic usage, just import lode and call the log function. Usage is largely the same as the print function, with it taking any number of positional arguments, formatting those to a string, and joining them together separated by spaces.
import lode; lode.log('hi there!')
Tests
Tests are stored the tests subdirectory of the main lode package. Set up lode for testing by running in the root directory of the git repository the following commands:
$ pip install -e .
$ pip install -r test-requirements.txt
Then run the tests:
$ py.test -v
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
File details
Details for the file lode-0.2.2.tar.gz
.
File metadata
- Download URL: lode-0.2.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c943a517f47375f473070c4a08aab9f51dab4183e395973fbcdb927a5b587a61 |
|
MD5 | 6201dd224915518f8f294b1869fb3c28 |
|
BLAKE2b-256 | d1e9c593fdb415afcb4af456aac18f21b14734d61b527e370082f09bd9a34947 |