Replace print with logging
This commit is contained in:
parent
cef02d0700
commit
f923cd2c50
3 changed files with 25 additions and 2 deletions
20
README.md
20
README.md
|
@ -115,3 +115,23 @@ coverage report # for command-line report
|
|||
coverage html # for HTML report
|
||||
open htmlcov/index.html
|
||||
```
|
||||
|
||||
Logging
|
||||
-------
|
||||
|
||||
To enable from your own code:
|
||||
|
||||
```python
|
||||
import logging
|
||||
import pylast
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
network = pylast.LastFMNetwork(...)
|
||||
```
|
||||
|
||||
To enable from pytest:
|
||||
|
||||
```sh
|
||||
pytest -k test_album_search_images --log-cli-level debug
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue