From the course: Learning Lombok: Streamlined Java Programming
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Simplify logging boilerplate code - Spring Tutorial
From the course: Learning Lombok: Streamlined Java Programming
Simplify logging boilerplate code
- [Instructor] For this video, we'll be using project code 03 01 begin Lombok, loaded in IntelliJ. Project Lombok offers a variety of logging annotations that covers all the major logging frameworks. Lombok covers the @Commons logging provided by Apache Logging. Flogger for FluentLoggers. JBossLog, which is designed for Jboss. And @Log annotation which is the default logging provided by the Java runtime. There is also a standard Log4j which is another Apache implementation of the ever popular Slf4j, which we'll be using for this project. There is even support for XSlf4j for XLogger. And finally, there is CustomLog, which is designed to give the ability to map a Custom Logging solution that you will provide. With this ability, you can control the fieldName identifier by setting this up in the lombok.config file with lombok.log.fieldName equals and whatever you decide to call it. The default is just log, but if you…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Simplify logging boilerplate code3m 42s
-
(Locked)
Cleaning up code and releasing resources3m 13s
-
(Locked)
Caching expensive one-time calculations3m 36s
-
(Locked)
Shorten your exception handling with SneakyThrows4m 50s
-
(Locked)
Challenge: Apply logging and cleanup2m 50s
-
(Locked)
Solution: Apply logging and cleanup3m 54s
-
(Locked)
-