Package org.wildstang.framework.logger
Class Log
- java.lang.Object
-
- org.wildstang.framework.logger.Log
-
public class Log extends java.lang.Object
Static class wrapping System.out/err logging functions for nicer and controlled output. The level controls which log functions work the higher the set level, the fewers logs. Lowest to highest: info, warn, error, none.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Log.LogLevel
An enum representing the 4 LogLevels.
-
Constructor Summary
Constructors Constructor Description Log()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
danger(java.lang.String msg)
Log no matter what.static void
error(java.lang.String msg)
Log at level "error".static void
info(java.lang.String msg)
Log at level "info".static void
setLevel(Log.LogLevel level)
Sets the minimum LogLevel to log at.static void
warn(java.lang.String msg)
Log at level "warn".
-
-
-
Method Detail
-
info
public static void info(java.lang.String msg)
Log at level "info". This is meant for normal messages that mean no alarm.- Parameters:
msg
- Log message text.
-
warn
public static void warn(java.lang.String msg)
Log at level "warn". This is meant for warning messages that mean something is approaching problematic.- Parameters:
msg
- Log message text.
-
error
public static void error(java.lang.String msg)
Log at level "error". This is meant for error messages that mean something went wrong and require attention.- Parameters:
msg
- Log message text.
-
danger
public static void danger(java.lang.String msg)
Log no matter what. This is meant for messages that mean the robot has entered a potentially dangerous state. E.g. The robot entering autonomous mode.- Parameters:
msg
- Log message text.
-
setLevel
public static void setLevel(Log.LogLevel level)
Sets the minimum LogLevel to log at.- Parameters:
level
- Lowest case at which it should log.
-
-