0
在我的應用程序性能我已經寫了下面的記錄記錄使用彈簧啓動sl4j
logging.level.com.intro.dmp=INFO
logging.level.org.springframework.web=ERROR
logging.level.com.intro.dmp=ERROR
logging.file=application.log
和我的應用程序是下面的,但它也沒有創造控制檯,而顯示任何日誌文件。什麼是我缺少在這裏,它是閱讀應用程序屬性
@SpringBootApplication(scanBasePackages = "com.intro")
@PropertySource("file:src/main/resources/application.properties")
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
logger.debug("--Application Started--");
logger.error("Check the main Articles");
logger.info("Checking files ");
}
}
不工作我的身份 –
@HimanshuKhandelwal好吧。然後試試第一點。在代碼中保留「@ PropertySource」。 –
不工作,我需要包含logback.xml,我使用的是最新版本的spring啓動? –