I was reviewing code, and I see everywhere the LOG class
is it to log in?
@Component
class ApplicationEventListener {
@SuppressWarnings("unused")
private static Logger LOG = LoggerFactory.getLogger(ApplicationEventListener.class);
and calls the same class.
i am using spring
No, the Logger class belongs to slf4j ( https://www.slf4j.org/ ), an api that is used to implement different trace creation systems in applications.
This type of system allows the programmer to know the status of the execution of a program without the need to perform a debug, since they write lines in a text file or in the console where the application is executed each time those lines are called. the ones you speak
It is one of the fundamental pillars in the maintenance of the application. Be sure to read ( https://logging.apache.org/log4j/1.2/ ) log4j or ( https://commons.apache.org/proper/commons-logging/guide.html ) apache commons log; two of the best known trace generation systems.
No, that class is to show log messages, to be able to control errors in the application.
A fairly simple use, and following the declaration that you put, could be:
Greetings.