OCCRA
Go to Post Supporting a FIRST team, only paying 10 bucks, and possibly winning a segway... what could be better! :) - Tom Bottiglieri [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-06-2018, 12:05 PM
ozdave ozdave is offline
Registered User
FRC #6072 (Triton Tech)
Team Role: Mentor
 
Join Date: Nov 2017
Rookie Year: 2017
Location: Newport Beach, CA, USA
Posts: 74
ozdave is an unknown quantity at this point
Logging frameworks

The Badlog post has prompted me to ask about logging frameworks generally. We want to implement a proper logging framework this season - we certainly suffered from not having one last season.

Badlog looks very good, and we will definitely have a play with it. However, our team is fairly new, and I wonder if there are other frameworks around that we can compare to.

So the question is: are there other frameworks that are recommended as well?
Reply With Quote
  #2   Spotlight this post!  
Unread 12-06-2018, 02:00 PM
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP/Shuffleboard/WPILib. 2084 alum
FRC #2084
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2010
Location: MA
Posts: 358
SamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant future
Re: Logging frameworks

Shuffleboard saves all the values it sees to disk and lets you play back the recorded data in the dashboard or export it to a CSV file. Pretty much every physical thing on the robot (sensors, motor controllers, subsystems, etc) are already logged in WPILib via the LiveWindow. Custom information can be sent over NetworkTables through the SmartDashboard class, the Shuffleboard class (new in 2019), or manually with the NetworkTables API.
__________________
WPILib developer
GRIP, Shuffleboard, RobotBuilder, OutlineViewer
Reply With Quote
  #3   Spotlight this post!  
Unread 12-06-2018, 05:20 PM
ozdave ozdave is offline
Registered User
FRC #6072 (Triton Tech)
Team Role: Mentor
 
Join Date: Nov 2017
Rookie Year: 2017
Location: Newport Beach, CA, USA
Posts: 74
ozdave is an unknown quantity at this point
Re: Logging frameworks

Thanks Sam

I note that Shuffleboard requires JDK 11. Couple of questions:

1. We have been using JDK 8 with VS Code, quite successfully. Are there any issues with upgrading to JDK 11?

2. Oracle have substantially changed the licensing with JDK 11. Are teams using the Oracle download, or the GPL release on jdk.java.net?

Regards

David
Reply With Quote
  #4   Spotlight this post!  
Unread 12-06-2018, 07:46 PM
Prateek M's Avatar
Prateek M Prateek M is offline
Kotlin Master Race
FRC #5190 (Green Hope Falcons)
Team Role: Programmer
 
Join Date: May 2018
Rookie Year: 2018
Location: Cary, North Carolina
Posts: 51
Prateek M is on a distinguished road
Re: Logging frameworks

Quote:
Originally Posted by ozdave View Post
2. Oracle have substantially changed the licensing with JDK 11. Are teams using the Oracle download, or the GPL release on jdk.java.net?
I believe the installer for the 2019 season will use the OpenJDK.
Reply With Quote
  #5   Spotlight this post!  
Unread 12-06-2018, 07:54 PM
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP/Shuffleboard/WPILib. 2084 alum
FRC #2084
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2010
Location: MA
Posts: 358
SamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant future
Re: Logging frameworks

Quote:
Originally Posted by ozdave View Post
1. We have been using JDK 8 with VS Code, quite successfully. Are there any issues with upgrading to JDK 11?

2. Oracle have substantially changed the licensing with JDK 11. Are teams using the Oracle download, or the GPL release on jdk.java.net?
1. Not for teams, no. The JDK used for FRC programming is comes bundled with the WPILib installer. VS Code will use that JDK for FRC projects, but it will not be on the PATH, so your system environment variables will be unchanged. The tool launchers in VS Code will use that JDK for running Shuffleboard and the other Java desktop tools.

2. Teams will be using OpenJDK
__________________
WPILib developer
GRIP, Shuffleboard, RobotBuilder, OutlineViewer
Reply With Quote
  #6   Spotlight this post!  
Unread 12-06-2018, 10:34 PM
ozdave ozdave is offline
Registered User
FRC #6072 (Triton Tech)
Team Role: Mentor
 
Join Date: Nov 2017
Rookie Year: 2017
Location: Newport Beach, CA, USA
Posts: 74
ozdave is an unknown quantity at this point
Re: Logging frameworks

Thanks Prateek and Sam
Reply With Quote
  #7   Spotlight this post!  
Unread 12-07-2018, 07:48 AM
dawonn's Avatar
dawonn dawonn is offline
Mentor
AKA: Dereck
FRC #3538 (RoboJackets)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Auburn Hills, Mi
Posts: 65
dawonn is an unknown quantity at this point
Re: Logging frameworks

Is there a preview for this 2019 shuffleboard available yet? we had a poor experience with shuffleboard last year, but are extremely excited for the potential that we saw. I would love to start evaluating it.

By the way, the vs code and Gradle set up that was published in the alpha is absolutely fantastic.
Reply With Quote
  #8   Spotlight this post!  
Unread 12-07-2018, 08:25 AM
auscompgeek's Avatar
auscompgeek auscompgeek is offline
Registered User
AKA: David Vo
FRC #4774 (The Drop Bears)
Team Role: Mentor
 
Join Date: Jan 2018
Rookie Year: 2016
Location: Sydney, Australia
Posts: 34
auscompgeek is an unknown quantity at this point
Re: Logging frameworks

Quote:
Originally Posted by dawonn View Post
Is there a preview for this 2019 shuffleboard available yet? we had a poor experience with shuffleboard last year, but are extremely excited for the potential that we saw. I would love to start evaluating it.
Everything is on GitHub and the Maven repo is public, so you can grab the beta Shuffleboard now. You will need Java 11 to run the 2019 beta version though.

If you weren't using the latest 2018 version of Shuffleboard (v1.3.1) though, it'll probably be easier to grab that first, as there were a few bugfixes and minor improvements after the last WPILib 2018 release: https://github.com/wpilibsuite/shuff...ses/tag/v1.3.1
Reply With Quote
  #9   Spotlight this post!  
Unread 12-07-2018, 01:45 PM
Clayton Yocom's Avatar
Clayton Yocom Clayton Yocom is online now
Programming Mentor
FRC #0027 (RUSH)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Clarkston, MI
Posts: 230
Clayton Yocom is a glorious beacon of lightClayton Yocom is a glorious beacon of lightClayton Yocom is a glorious beacon of lightClayton Yocom is a glorious beacon of lightClayton Yocom is a glorious beacon of light
Re: Logging frameworks

Depends on what you want to accomplish by logging.

If you are just looking for code debug, something like slf4j's simplelogger may be enough.

If you are looking to do something more like logged robot telemetry, you are going to need a different solution such as badlog.
__________________
Member of FRC Team 45 TechnoKats : 2011 - 2016
Member of FRC Team 27 Team RUSH : 2017 - Present
Reply With Quote
  #10   Spotlight this post!  
Unread 12-09-2018, 03:28 PM
krieck's Avatar
krieck krieck is offline
Registered User
AKA: Keith
FRC #2846 (Firebears)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Minnesota
Posts: 66
krieck is an unknown quantity at this point
Re: Logging frameworks

Let me speak up in favor of simple debug logging. All robot programmers should be putting some well chosen print statements into their code. The results will show up on your driver's console and will also be viewable for all previous matches on the driver station Log Viewer. This can provide critical information such as which commands really executed, what your vision system was seeing, or how much air pressure you had available.

Simple print statements will do the job. If you want a slightly more sophisticated logging framework, I suggest the java.util.logging framework. It is built into your JVM, so you won't need to add any dependencies to your build.gradle file.

I have some notes on configuring JUL loggers at: https://firstmncsa.org/2018/12/09/de...s-and-logging/
Reply With Quote
  #11   Spotlight this post!  
Unread 12-09-2018, 11:20 PM
ozdave ozdave is offline
Registered User
FRC #6072 (Triton Tech)
Team Role: Mentor
 
Join Date: Nov 2017
Rookie Year: 2017
Location: Newport Beach, CA, USA
Posts: 74
ozdave is an unknown quantity at this point
Re: Logging frameworks

Thanks very much Keith. I am very familiar with logging - use log4net and Serilog extensively, and various others in professional life.

I agree that a lot can be done with simple print statements, but that gets very hard to manage very quickly.

The advantage of Badlog and Shuffleboard is they incorporate stuff for the physical environment we find ourselves. I am slightly concerned that Badlog might be a bit sophisticated for our team at the moment, but I have not spent enough time with it yet.

Your blog post on java.util.logging is very good, and we may well start with that.

Regards

David
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:43 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi