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?
After struggling for a long time, I finally found the problem,
This method can find the configuration file path in the windows environment. Because replace is used, the path is wrong. It can be corrected after modification.