Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pwwang/pyppl_echo
Echo script output to PyPPL logs
https://github.com/pwwang/pyppl_echo
Last synced: 14 days ago
JSON representation
Echo script output to PyPPL logs
- Host: GitHub
- URL: https://github.com/pwwang/pyppl_echo
- Owner: pwwang
- License: mit
- Created: 2019-12-24T17:01:22.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-06T05:13:18.000Z (over 4 years ago)
- Last Synced: 2024-12-10T04:27:11.534Z (24 days ago)
- Language: Python
- Size: 35.2 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyppl_echo
Echo script output to PyPPL logs
- Echo stdout/stderr with filters
- Log specific infomation in PyPPL log## Installation
```shell
pip install pyppl_echo
```## Usage
```python
# only echo first job
PyPPL(config_echo_jobs = 0)
# echo first 3 jobs
PyPPL(config_echo_jobs = '0-2')
PyPPL(config_echo_jobs = '0,1,2')
PyPPL(config_echo_jobs = [0,1,2])
# only echo stdout
PyPPL(config_echo_jobs = 0, config_echo_types = 'stdout')
# echo all
PyPPL(config_echo_jobs = 0, config_echo_types = 'all')
# echo with filter
# lines startswith 'DEBUG'
PyPPL(config_echo_jobs = 0, config_echo_types = {'stderr': r'^DEBUG'})# log message to PyPPL log
PyPPL(config_echo_jobs = 0, config_echo_types = {'stderr': r'^pyppl.logger'})
# in your script
# sys.stderr.write('pyppl.logger: debug infomation')
# with log leve
# sys.stderr.write('pyppl.logger.debug: debug infomation')```