When developing in eclipse, files can be generated normally in windows, and info and debug logs can also be output. However, there is a problem when switching to the Linux environment. Files can only be generated, and the startup log can be printed. After the startup is completed, , subsequent logs cannot be output to the file.
logback.xml should be fine. I have the same configuration in another project, and logs can be printed normally, but not in new projects. Now I wonder if it is a permission issue in the Linux environment?
折腾半天,终于找到问题了,
这个方法在windows环境下可以找到配置文件路径,因为用了replace,导致路径错误,修改之后就可以了。