Package frc.lib5k.utils
Class RobotLogger
- java.lang.Object
-
- frc.lib5k.utils.RobotLogger
-
public class RobotLogger extends java.lang.ObjectA threaded logger for use by all robot functions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRobotLogger.LevelLog level The kRobot level will immediately push to the console, everything else is queued until the next notifier cycle
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenableUSBLogging(USBLogger logger)Enable logging to a USBstatic RobotLoggergetInstance()Get a RobotLogger instancevoidlog(java.lang.String msg)Log a message to netconsole with the INFO log level.voidlog(java.lang.String msg, RobotLogger.Level log_level)voidlog(java.lang.String component, java.lang.String msg)voidlog(java.lang.String component, java.lang.String msg, RobotLogger.Level log_level)Logs a message to netconsole with a custom log level.voidstart(double period)Start the periodic logger
-
-
-
Method Detail
-
enableUSBLogging
public void enableUSBLogging(USBLogger logger)
Enable logging to a USB- Parameters:
logger- USB logger object
-
start
public void start(double period)
Start the periodic logger- Parameters:
period- The logging notifier period time in seconds
-
getInstance
public static RobotLogger getInstance()
Get a RobotLogger instance- Returns:
- The current RobotLogger
-
log
public void log(java.lang.String msg)
Log a message to netconsole with the INFO log level. This message will not be logged immediately, but instead through the notifier.- Parameters:
msg- The message to log
-
log
public void log(java.lang.String msg, RobotLogger.Level log_level)
-
log
public void log(java.lang.String component, java.lang.String msg)
-
log
public void log(java.lang.String component, java.lang.String msg, RobotLogger.Level log_level)Logs a message to netconsole with a custom log level. The kRobot level will immediately push to the console, everything else is queued until the next notifier cycle- Parameters:
msg- The message to loglog_level- the Level to log the message at
-
-