rosros 0.2.5
Simple unified interface to ROS1 / ROS2 Python API
Loading...
Searching...
No Matches
rosros.rospify.log Namespace Reference

Stand-in for `rospy` logging functionality in ROS2. More...

Classes

class  LogInhibitor
 

Functions

 _base_logger (msg, args, kwargs, throttle=None, throttle_identical=False, level=None, once=False)
 Issues the logging call, if throttling or once-argument allow for it.
 
 _make_caller_id (depth=2)
 Returns caller id at specified call stack depth.
 
 logdebug (msg, *args, **kwargs)
 
 logdebug_once (msg, *args, **kwargs)
 
 logdebug_throttle (period, msg, *args, **kwargs)
 
 logdebug_throttle_identical (period, msg, *args, **kwargs)
 
 logerr (msg, *args, **kwargs)
 
 logerr_once (msg, *args, **kwargs)
 
 logerr_throttle (period, msg, *args, **kwargs)
 
 logerr_throttle_identical (period, msg, *args, **kwargs)
 
 logfatal (msg, *args, **kwargs)
 
 logfatal_once (msg, *args, **kwargs)
 
 logfatal_throttle (period, msg, *args, **kwargs)
 
 logfatal_throttle_identical (period, msg, *args, **kwargs)
 
 loginfo (msg, *args, **kwargs)
 
 loginfo_once (msg, *args, **kwargs)
 
 loginfo_throttle (period, msg, *args, **kwargs)
 
 loginfo_throttle_identical (period, msg, *args, **kwargs)
 
 logwarn (msg, *args, **kwargs)
 
 logwarn_once (msg, *args, **kwargs)
 
 logwarn_throttle (period, msg, *args, **kwargs)
 
 logwarn_throttle_identical (period, msg, *args, **kwargs)
 

Variables

 logerror = logerr
 
 logout = loginfo
 

Detailed Description

Stand-in for `rospy` logging functionality in ROS2.

Heavily modified copy from ROS1 `rospy.node`, at https://github.com/ros/ros_comm (`clients/rospy/src/rospy/core.py`), released under the BSD License.

Function Documentation

◆ _base_logger()

rosros.rospify.log._base_logger (   msg,
  args,
  kwargs,
  throttle = None,
  throttle_identical = False,
  level = None,
  once = False 
)
protected

Issues the logging call, if throttling or once-argument allow for it.

Parameters
msglog message
argspositional arguments for log message
kwargskeyword arguments for log message
throttleseconds to throttle log messages from call site for
throttle_identicalwhether to throttle identical consecutive log messages
levellog level name
oncewhether to log only once from callsite

Definition at line 157 of file log.py.

◆ _make_caller_id()

rosros.rospify.log._make_caller_id (   depth = 2)
protected

Returns caller id at specified call stack depth.

Definition at line 137 of file log.py.

◆ logdebug()

rosros.rospify.log.logdebug (   msg,
args,
**  kwargs 
)

Definition at line 59 of file log.py.

◆ logdebug_once()

rosros.rospify.log.logdebug_once (   msg,
args,
**  kwargs 
)

Definition at line 112 of file log.py.

◆ logdebug_throttle()

rosros.rospify.log.logdebug_throttle (   period,
  msg,
args,
**  kwargs 
)

Definition at line 75 of file log.py.

◆ logdebug_throttle_identical()

rosros.rospify.log.logdebug_throttle_identical (   period,
  msg,
args,
**  kwargs 
)

Definition at line 91 of file log.py.

◆ logerr()

rosros.rospify.log.logerr (   msg,
args,
**  kwargs 
)

Definition at line 68 of file log.py.

◆ logerr_once()

rosros.rospify.log.logerr_once (   msg,
args,
**  kwargs 
)

Definition at line 121 of file log.py.

◆ logerr_throttle()

rosros.rospify.log.logerr_throttle (   period,
  msg,
args,
**  kwargs 
)

Definition at line 84 of file log.py.

◆ logerr_throttle_identical()

rosros.rospify.log.logerr_throttle_identical (   period,
  msg,
args,
**  kwargs 
)

Definition at line 103 of file log.py.

◆ logfatal()

rosros.rospify.log.logfatal (   msg,
args,
**  kwargs 
)

Definition at line 71 of file log.py.

◆ logfatal_once()

rosros.rospify.log.logfatal_once (   msg,
args,
**  kwargs 
)

Definition at line 124 of file log.py.

◆ logfatal_throttle()

rosros.rospify.log.logfatal_throttle (   period,
  msg,
args,
**  kwargs 
)

Definition at line 87 of file log.py.

◆ logfatal_throttle_identical()

rosros.rospify.log.logfatal_throttle_identical (   period,
  msg,
args,
**  kwargs 
)

Definition at line 107 of file log.py.

◆ loginfo()

rosros.rospify.log.loginfo (   msg,
args,
**  kwargs 
)

Definition at line 62 of file log.py.

◆ loginfo_once()

rosros.rospify.log.loginfo_once (   msg,
args,
**  kwargs 
)

Definition at line 115 of file log.py.

◆ loginfo_throttle()

rosros.rospify.log.loginfo_throttle (   period,
  msg,
args,
**  kwargs 
)

Definition at line 78 of file log.py.

◆ loginfo_throttle_identical()

rosros.rospify.log.loginfo_throttle_identical (   period,
  msg,
args,
**  kwargs 
)

Definition at line 95 of file log.py.

◆ logwarn()

rosros.rospify.log.logwarn (   msg,
args,
**  kwargs 
)

Definition at line 65 of file log.py.

◆ logwarn_once()

rosros.rospify.log.logwarn_once (   msg,
args,
**  kwargs 
)

Definition at line 118 of file log.py.

◆ logwarn_throttle()

rosros.rospify.log.logwarn_throttle (   period,
  msg,
args,
**  kwargs 
)

Definition at line 81 of file log.py.

◆ logwarn_throttle_identical()

rosros.rospify.log.logwarn_throttle_identical (   period,
  msg,
args,
**  kwargs 
)

Definition at line 99 of file log.py.

Variable Documentation

◆ logerror

rosros.rospify.log.logerror = logerr

Definition at line 130 of file log.py.

◆ logout

rosros.rospify.log.logout = loginfo

Definition at line 128 of file log.py.