Add Log Statements
Add Log Statements
Watch a demonstration of the current section
- Inside of eclipse, navigate to src > main > java
- Open ExampleApplication.java
-
Add the following code inside of the appStart method.
ScheduledExecutorService executor = Executors.newScheduledThreadPool(1); Runnable task = () -> log.debug("Scheduling: " + System.nanoTime()); int initialDelay = 0; int period = 1; executor.scheduleAtFixedRate(task, initialDelay, period, TimeUnit.SECONDS);
- Verify that the code looks the same as https://github.com/red5pro/red5pro-dev-series/blob/master/06-application-level-logging/example/src/main/java/com/red5pro/example/ExampleApplication.java