Problems with springboot-log4j2 log file generation

I configured the log in log4j2.yml.
where the path to the log is as follows:

Configuration:
  Properties:
    Property:
      - name: log.path
        value: log
fileName: ${log.path}/platform/${project.name}_platform.log

when I run locally, logs are generated to the root directory of the project

as shown in the figure above, there is a log folder in which is the log.

after I uploaded him to the server, I didn"t see any corresponding logs in the entire tomcat folder.

what"s going on with this? where did I configure it wrong?


well, I found the instructions myself:

https://www.cnblogs.com/doit8...

log4j profile log output path modification

 log4j:

(1) absolute path method: directly configured as system absolute path;
(2) relative path method:

        log4j.appender.logfile.File=../logs/app.logtomcatlogs;
        log4j.appender.logfile.File=logs/app.logtomcatbinlogs;

(3) use the environment variable relative path method: the program will first look for the jvm environment variable, and then find the system environment variable to find the variables in the configuration file.

    log4j.appender.logfile.File=${user.dir}/logs/app.logtomcat${user.dir}tomcatbin;
    log4j.appender.logfile.File=${user.home}/logs/app.log${user.home};
    log4j.appender.logfile.File=${webApp.root}/logs/app.log${webApp.root};
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36eff-2ad99.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36eff-2ad99.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?