SpringBoot’s logging system (log grouping, file output, rolling archiving)

#1024 Programmer’s Day|Participate in submissions and win limited medals and exclusive prizes# Directory 1 Introduction 2. SpringBoot log default configuration process 3. Default log format 4. Logging in the class 5. Log level 6. Log grouping 7. File output 8. File filing and rolling cutting 9. Custom configuration 10. Switch to log4j2 11 Practice SpringBoot3 […]

Java logging system JUL

Table of Contents Introduction to JUL Use of JUL Log level Specify log output address Parent-child relationship of Logger object Logger reads configuration file JUL introduction Java’s own framework, easy to use, no need to introduce dependencies Usage of JUL public class JULTest { @Test public void testLogger() throws Exception{ //Get the unique identifier of […]

Muduo source code analysis: AsyncLogging asynchronous log class

Introduction AsyncLogging is muduo’s log. If the program directly writes logs to files, it may be blocked. The muduo front-end has designed two BufferPtrs, namely currentBuffer_ and nextBuffer_, and a vector (buffers_) that stores BufferPtr. Multiple front-end threads write data to currentBuffer_. When currentBuffer_ is full, put it into buffers_ and notify the back-end thread […]

Java logging system Log4j2

Introduction to Log4j2 Log4j2 is an upgraded version of Log4j. It refers to the excellent design of Logback and fixes some problems. The main advantages are: Exception handling. In logback, exceptions in Appender will not be perceived by the application, but in log4j2, some exception handling mechanisms are provided. Performance improvement, log4j2 has obvious performance […]

Logback of Java logging system

Table of Contents Logback Simple use of Logback Logback configuration file log4j.peoperties converted to logback.xml Logback Logback’s performance is better than log4j. Logback is divided into three modules: logback-core: the basic module of the other two modules logback-classic: It is an improved version of log4j and also implements the slf4j API logback-access: The access module […]

Java logging system Log4j

Table of Contents Log4J Simple use of Log4j Log level Log4j components Loggers Appenders Layout Layout format Setting configuration file loading Configuration file analysis Log4J It is an open source logging framework under Apache. Simple use of Log4j @Test public void testLog4J(){ Logger logger = Logger.getLogger(Log4jTest.class); logger.info(“hello log4j”); } log4j:WARN No appenders could be found […]

Logging of Fast DDS

Directory Configuration log output content RegisterComsumers Set log level Reset configuration XML configuration filter Reset log filtering Comsumers StdoutConsumer StdoutErrConsumer FileConsumer Disable log code The log format is as follows: <Timestamp> [<Category> <Verbosity Level>] <Message> (<File Name>:<Line Number>) -> Function <Function Name> # like: 2020-05-27 11:45:47.447 [DOCUMENTATION_CATEGORY Error] This is an error message (example.cpp:50) -> […]