Rys
Rys

Reputation: 5154

Is possible to load log4j2 config from config server?

Is possible to load log4j2 config.yml from config server or reaload spring boot logging configuration allways from the config server? Or get the config from a git? For example:

logging:
  config: http://xxx.xx.xx.xx:3000/admin123/config-repository/src/master/log4j2.yml

Upvotes: 3

Views: 1799

Answers (2)

Rys
Rys

Reputation: 5154

You must read the file in raw mode to get the configuration from gogs. So, your url with be something like this:

http://xxx.xx.xx.75:3000/admin123/config-repository/raw/master/log4j2.xml

Upvotes: 3

Remko Popma
Remko Popma

Reputation: 36754

Yes, by specifying the destination URL with system property log4j.configurationFile. This accepts any wellformed URL.

Upvotes: 1

Related Questions