writelog
[Drivers]
Collaboration diagram for writelog:
The readlog driver can be used to replay the data (to client programs, the replayed data will appear to come from the real sensors).
The writelog driver logs data independently of any client connections to the devices that it is logging. As long as it's enabled and recording, the writelog driver records data from the specified list of devices at the rate that new data is produced by the first device in that list (so put the fastest one first). Commands are not logged.
For help in remote-controlling logging, try playervcr. Note that you must declare a log device to allow logging control.
Note that unless you plan to remote-control this driver via the log interface (e.g., using playervcr), you should specify the alwayson
option in the configuration file so that logging start when Player starts.
- Compile-time dependencies
- none
- Provides
- log : can be used to turn logging on/off
- Requires
The following interfaces are supported in principle but are currently disabled because they need to be updated:
- Configuration requests
- PLAYER_LOG_REQ_SET_WRITE_STATE
- PLAYER_LOG_REQ_SET_STATE
- PLAYER_LOG_REQ_SET_FILENAME
- Configuration file options
- log_directory (string)
- Default: Directory player is run from.
- Name of the directory to store the log file in. Relative paths are taken from the directory player is run from. Absolute paths work as expected. The directory is created if it doesn't exist.
- timestamp_directory (integer)
- Default: 0
- Add a timestamp to log_directory, in the format "YYYY_MM_DD_HH_MM_SS", where YYYY is the year, MM is the month, etc.
- basename (string)
- Default: "writelog_"
- Base name of the log file.
- timestamp (integer)
- Default: 1
- Add a timestamp to each file, in the format "YYYY_MM_DD_HH_MM_SS", where YYYY is the year, MM is the month, etc.
- extension (string)
- Default: ".log"
- File extension for the log file.
- autorecord (integer)
- Default: 0
- Default log state; set to 1 for continous logging.
- camera_log_images (integer)
- Default: 1
- Save image data to the log file. If this is turned off, a log line is still generated for each frame, containing all information except the raw image data.
- camera_save_images (integer)
- Default: 0
- Save image data to external files within the log directory. The image files are named "(basename)(timestamp)_camera_II_NNNNNNN.pnm", where II is the device index and NNNNNNN is the frame number.
- log_directory (string)
- Example
# Log data from laser:0 position2d:0 to "/home/data/logs/mydata_YYYY_MM_DD_HH_MM_SS.log" driver ( name "writelog" log_directory "/home/user/logs" basename "mydata" requires ["laser:0" "position2d:0"] provides ["log:0"] alwayson 1 autorecord 1 )