logger¶
This node logs data to a .log file for easier debugging.
Subscribed topics
arm_angles (ArmAngles): The arm angles for the robot which gets sent to the digital twin.
_vr_dirve (VRDrive): The VR drive data received from the headset.
_vr_arm (VRArm): The VR arm data received from the headset.
_vr_mode (VRMode): The VR mode data received from the headset.
switch_camera (SwitchCamera): The camera to switch to.
robot_data (RobotData): Robot data (voltage, battery, etc.)
message (Message): Message to be logged including level.
Published topics
None
logger_node¶
- class robot.src.logger.logger.logger_node.LoggerNode(*args: Any, **kwargs: Any)¶
Logs messages from nodes.
- robot.src.logger.logger.logger_node.main(args=None)¶
logger¶
- robot.src.logger.logger.logger¶
alias of <module ‘robot.src.logger.logger.logger’ from ‘/home/runner/work/robot/robot/robot/src/logger/logger/logger.py’>
utils¶
- class robot.src.logger.logger.utils.FileFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)¶
- _format = '%(asctime)s.%(msecs)03d - [%(levelname)s]: %(message)s'¶
- FORMATS = {10: '%(asctime)s.%(msecs)03d - [%(levelname)s]: %(message)s', 20: '%(asctime)s.%(msecs)03d - [%(levelname)s]: %(message)s', 30: '%(asctime)s.%(msecs)03d - [%(levelname)s]: %(message)s', 40: '%(asctime)s.%(msecs)03d - [%(levelname)s]: %(message)s', 50: '%(asctime)s.%(msecs)03d - [%(levelname)s]: %(message)s'}¶
- format(record)¶
Format the specified record as text.
The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.