Tool to extract and analyze log files off of the roboRIO.
extractor will pull the log files off of your robot's roboRIO using sftp and find which log files are actually from competition matches. With the basic configuration file extractor will do the following steps:
- Load the configuration file (
conf.toml
). - Prepare for using sftp.
- Sync the files from the source folder (
source_folder
inconf.toml
) to a local folder. - Move log files from competition matches to a folder separate from the other log files.
- Put the log files from competition matches into a specific filename based on the competition match it's linked to.
Real log files (log files from competitions) have a specific format to them:
- Current time in YYYY-MM-DD format (e.g.
2022-02-13
). - Event name (e.g.
NHBB
). - First character of match type (e.g.
Q
). - Match number (e.g.
06
). - Replay number (e.g.
01
). - First character of alliance (e.g.
R
). - Location (e.g.
1
).
Example:
2022-02-13_NHBB_Q-06-01_R1.log
extractor is configured using the TOML configuration format. When running the tool it is loaded from the current working directory from a file called conf.toml
. Here are the configuration fields:
Name | Description | Type | Default Value |
---|---|---|---|
hostname |
Hostname of the roboRIO | String | None, required |
port |
Port that SFTP is running on for the roboRIO | number | 22 |
destination_folder |
Path where all log files should go before sorting | String | "./source/" |
source_folder |
Path on roboRIO where all the log files are | String | None, required |
username |
Username to use when connecting to the roboRIO via SFTP | String | "lvuser" |
password |
Password to use when connecting to the roboRIO via SFTP | String | "" |
remove |
If the log files should be removed from the roboRIO after transfer | boolean | false |
real_logs_folder |
Path to where the real log files should go | String | "./real/" |
Here is an example of this configuration:
hostname = "roboRIO-501-FRC"
source_folder = "/media/sda1/501logs/"
remove = true
Just run the executable.