`extended_rospylogs` implements for `rospy` some of the extra functionalities found in `roscpp` for logging.
## Installation
You can install `extended_rospylogs` from pip using
```
pip install extended_rospylogs
```
or using
```
pip install git+https://github.com/charlielito/extended_rospylogs
```
## ROS log messages extension
In `rospy` there are only 5 functions for logging: `rospy.logdebug`, `rospy.loginfo`, `rospy.logwarn`, `rospy.logerr` and `rospy.logfatal`. In `roscpp` you can find other options like `ROS_DEBUG_COND`, `ROS_DEBUG_NAMED`, `ROS_DEBUG_COND_NAMED`, etc (for more info go to [ros logging](http://wiki.ros.org/roscpp/Overview/Logging)).
The conditional option for logging is very useful when you want to have different logging messages in your nodes, and you want to change it in runtime (because you only can specify the `log_level` when initializing the node).
### Extended Functions
For the moment here are implemented all the `rospy` logging functions with the `cond` option:
* `logdebug_cond(bool, message)`
* `loginfo_cond(bool, message)`
* `logwarn_cond(bool, message)`
* `logerr_cond(bool, message)`
* `logfatal_cond(bool, message)`
## Usage
```python
import rospy
from extended_rospylogs import logdebug_cond, loginfo_cond
rospy.init_node('some_node')
rate = 30
debug = True
r = rospy.Rate(rate)
while not rospy.is_shutdown():
#### DO STUFF
logdebug_cond(debug, "Some debug message")
loginfo_cond(debug, "Some info message for debugging")
r.sleep()
```
Note that the `debug` variable could be a **node parameter** so it could be changed on runtime.
Metadata
Release files for extended_rospylogs 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| extended_rospylogs-0.0.5.tar.gz | 2.6 kB | Without provenance | Details for extended_rospylogs-0.0.5.tar.gz |
Release files / extended_rospylogs-0.0.5.tar.gz
| Download URL | extended_rospylogs-0.0.5.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e31ed4df5ab8d3ad5dfe0279b1d9e120b30b425cdd18d6df826d112da03bab54
|
|
BLAKE2b-256 checksum How to use checksums |
ee161245cba8eeedf17931d5e2b2ef684278fbe5f85879fbbb120ea6223f9a1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for extended_rospylogs 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.