[backend] Logging additions (#24)

* Remove de_pest log level, add instanced shouldLog

* Rename Server, VisionProcess LogGroup to WebServer, VisionModule

* Rename Level to LogLevel

* Added lambda logger methods

* Updated Platform util class, added bootup logging

* Naming fix

* Fix errors, apply spotless

* Apply spotless
This commit is contained in:
Banks T
2020-07-11 22:43:19 -04:00
committed by GitHub
parent a3ee9d8977
commit 9f1899b081
15 changed files with 148 additions and 110 deletions

View File

@@ -22,7 +22,7 @@ import org.photonvision.common.logging.LogGroup;
import org.photonvision.common.logging.Logger;
public class Server {
private static final Logger logger = new Logger(Server.class, LogGroup.Server);
private static final Logger logger = new Logger(Server.class, LogGroup.WebServer);
public static void main(int port) {

View File

@@ -39,7 +39,7 @@ import org.photonvision.vision.processes.VisionModuleManager;
@SuppressWarnings("rawtypes")
public class SocketHandler {
private final Logger logger = new Logger(SocketHandler.class, LogGroup.Server);
private final Logger logger = new Logger(SocketHandler.class, LogGroup.WebServer);
private final List<WsContext> users = new ArrayList<>();
private final ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory());
private final DataChangeService dcService = DataChangeService.getInstance();

View File

@@ -34,7 +34,7 @@ import org.photonvision.common.logging.Logger;
* DO NOT use logging in this class. If you do, the logs will recuse forever!
*/
class UIOutboundSubscriber extends DataChangeSubscriber {
Logger logger = new Logger(UIOutboundSubscriber.class, LogGroup.Server);
Logger logger = new Logger(UIOutboundSubscriber.class, LogGroup.WebServer);
private final SocketHandler socketHandler;