來源於 : https://blog.csdn.net/testcs_dn/article/details/86309819
springboot日誌配置 logging.path logging.file 注意事項
可能有些小夥伴會同時配置 logging.path 和 logging.file,但是又發現其中一個不生效。
官方文檔中有這麼一句:
If you want to write log files in addition to the console output you
need to set a logging.file or logging.path property
也就是說,它們不會同時生效,只配置其中一個就好了。
例如我配置的時候只指定path
logging.path = ./logs
那麼記錄日誌的時候默認的文件名是:spring.log