Real programmers know to write code in Notepad++ 😂 No, in fact, I've copy/past the content by parts, reading a lot of documentation and trying different things. Finally, for the video, I just copy from my second screen what worked before
Most videos skip steps which creates a lot of gaps in understanding. Sergio, presents in one of the best ways that is quite clear but comprehensive at the same time. Keep up the great work!
You have all the available appenders in the documentation of Log4J (logging.apache.org/log4j/2.x/manual/appenders.html) and Logback (logback.qos.ch/manual/appenders.html). Nevertheless, choosing the right one can be difficult as there are more dozens.
For Logback, you Have the SMTPAppender (logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/net/SMTPAppender.html) and for Log4J you also have the SMTPAppender (logback.qos.ch/apidocs/ch/qos/logback/classic/net/SMTPAppender.html). Those can be configured in the respective configuration files.
I didn't understand why you needed both root level INFO for File and Console as well as com.sergio.socialnetwork at DEBUG level. Can you explain in detail the benefit?
When I set the log level to a handler, I indicate which is the maximum accepted level. Then, in the filters/packages, I indicate the log level I want (which depends on the maximum allowed by the handlers).
Hi, This video is very useful, do we still have to use logback.xml file or is there any alternative to handle it via java code itself? thank you for the videos very informative channel. Thanks again.