The conditions are as follows: Log4j2 log framework is used in my project, and log4j2.yml is used in the configuration file. I want to configure the file storage path and specific enabled log level in application.yml.

Note: I don't want to use XML configuration, or maven configuration, because I need to modify multiple configuration files. The problem is that I have to configure one in application.ymlCopy the code
log:
  path: e:/log/
Copy the code
Configuration: Status: info monitorInterval: 30 Properties: # Define global variables Property: # Default (for development environment). Console = WARN - dlog.level. XJJ =trace # production: -Dlog.level.console=warn -Dlog.level.xjj=info - name: log.level.console value: info - name: path value: $[log.path]Copy the code

How do I assign it to log4j2.yml. I know the XML way to get the data in application.yml. But what about YML? Trying to get some help from the big boys.