ligerbots / Steamworks2017Robot

LigerBots robot code for FIRST Robotics Competition Steamworks
MIT License
2 stars 1 forks source link

Implement logging #4

Closed xeniarose closed 7 years ago

xeniarose commented 7 years ago

We need a logging framework that can make post-match diagnostics better than sifting through console output mixed with binary garbage (the driverstation log format) with notepad++

cbf66 commented 7 years ago

Would this log be on the laptop, or the RoboRio?

xeniarose commented 7 years ago

The robot code would do the logging. One of the issues is whether to save the log on the rio's flash storage, which you've said could wear out. The other option would be to only send the log via tcp to the drive computer, but then network issues would screw us up. Maybe we should find out whether FRC_UserProgram.log is actually on the drive, or memory-mapped. If it's memory-mapped we probably shouldn't log to the drive either.

prensing commented 7 years ago

Is the RoboRio powered off automatically at the end of the match? If not, we could log it to an in-memory temp file (used by called a RAM disk) and then upload (automatically?) at the end of the match.

xeniarose commented 7 years ago

Or if we come up with a good way to extract the log data out of driverstation's ridiculous format, we could simply log to stdout

cbf66 commented 7 years ago

Wouldn't the easiest thing be to just write a nice viewer (or perhaps filter) for the driverstation log format? In fact, I seem to remember someone announcing one on Chief Delphi sometime in the past couple of years ..

(Paul -- the robot isn't powered off automatically at the end of the match, but our communication might be cut. Not sure. Bear in mind that FIRST doesn't want your robot to continue doing things ...)

xeniarose commented 7 years ago

The main issue is that the default driverstation log viewer doesn't have a search function. Making our own is an option, or we could avoid writing anything new altogether and just adopt a logging framework that already has a good log viewer

coachFitz0807 commented 7 years ago

I would be astounded if this has not already been solved. Please try searching ChiefDelphi and if you can't find anything then post a request. Thanks.

Sent from my iPhone

On Jan 25, 2017, at 11:19 AM, Erik Uhlmann notifications@github.com wrote:

The main issue is that the default driverstation log viewer doesn't have a search function. Making our own is an option, or we could avoid writing anything new and just adopt a logging framework that already has a good log viewer

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

xeniarose commented 7 years ago

There is an open source DS log viewer, but it doesn't appear to display stdout from the robot program.

Besides, severity levels and tags would be useful to have. Again, we can implement this ourselves or use an existing logging framework and avoid extra work.

cbf66 commented 7 years ago

Well, if we have to write something, how about just crack the format and convert it to a proper .csv? Then just open it in Excel, or whatever..

Can we build it on/from the open source DS viewer? Where is that code?

xeniarose commented 7 years ago

Added a logging framework