View Single Post
  #1   Spotlight this post!  
Unread 08-01-2015, 23:46
Asymons Asymons is offline
Registered User
FRC #4716 (Purple Raiders)
Team Role: Driver
 
Join Date: Apr 2013
Rookie Year: 2013
Location: Ontario
Posts: 33
Asymons is an unknown quantity at this point
Logging Data in Java

Hello everyone!

I have a few questions about logging. Currently, our team uses a simple System.out.println to tell us if a command is running correctly, however; we would like to take it a step further. When looking at different team's robot code to learn from, I've noticed they would use some try and catch instance for logging. Is this restricted to CAN setups because I've only seen it as the code here follows, similar in nature for a variety of teams:

Code:
       try{
            System.out.println("FL = " + RobotMap.frontRightMotor.getPosition());
         }catch (CANTimeoutException ex) {
            System.out.println("--- Error Printing Encoder ---");
                ex.printStackTrace();
             }

So here are my questions:
1) Is logging possible without a CAN setup? (I assume yes, but to be sure I want to ask)
2) What are the benefits of logging?
3) Does logging use up too many resources on your processor?
4) What would you log and why?

Sorry if the question seems too trivial; however, I'm stumped on this currently.

Last edited by Asymons : 08-01-2015 at 23:55.
Reply With Quote