bael-4843: add main spring boot class and logger

This commit is contained in:
sharifi 2021-07-01 14:08:53 +04:30
parent 1b4c50c7c1
commit 002c0ef4e8
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package com.baeldung.syslog;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringBootSyslogApplication {
private static final Logger logger = LogManager.getLogger(SpringBootSyslogApplication.class);
public static void main(String[] args) {
SpringApplication.run(SpringBootSyslogApplication.class, args);
logger.debug("Debug log message");
logger.info("Info log message");
logger.error("Error log message");
logger.warn("Warn log message");
logger.fatal("Fatal log message");
logger.trace("Trace log message");
}
}