I add a loggerAppender on startup,like below SpringBoot refreshEvent trigger loggging  system reinitialize,logging configuration on startup will be ignore SpringBoot refreshEvent trigger loggging  system reinitialize,logging configuration on startup will be ignore If refreshEvent trigger,like refresn bean,logging system will reinitialize,and reset logging configuration,use resource file by default but my appender is not a resource file,so it will be stop and remove ,I'm use logback,and class LogbackLoggingSystem is not support this,maybe some supports for this situation should be add?

Comment From: esotericman

or rewrite LogbackLoggingSystem user self?

Comment From: esotericman

I didn't find any way to change the LoggingSystem,any support may I not find?

Comment From: esotericman

org.springframework.boot.logging.LoggingSystem property ,I find it

Comment From: esotericman

It's too ugly!!

Comment From: gogo-zby

You can define org.springframework.boot.logging.LoggingSystem,like that ‘System.setProperty("org.springframework.boot.logging.LoggingSystem","xxx")’ before org,springframework.boot.context.logging.LoggingApplicationListener#onApplicationEvent.

Comment From: esotericman

You can define org.springframework.boot.logging.LoggingSystem,like that ‘System.setProperty("org.springframework.boot.logging.LoggingSystem","xxx")’ before org,springframework.boot.context.logging.LoggingApplicationListener#onApplicationEvent.

I know,but this's too ugly

Comment From: esotericman

Maybe publish a LoggingSystemRefreshEvent ? and user do it self

Comment From: wilkinsona

@flmelody Every comment on this issue notifies everyone who is watching this repository. Please try to avoid making multiple single-sentence comments and instead combine them into a single, longer comment.

https://github.com/spring-projects/spring-boot/issues/25847 is tracking support for programmatic configuration of Logback. This issue is a duplicate of that request so I am going to close it. In the meantime, a custom logging system (configured using the system property suggested by @gogo-zby) is your best option.

Comment From: esotericman

@flmelody Every comment on this issue notifies everyone who is watching this repository. Please try to avoid making multiple single-sentence comments and instead combine them into a single, longer comment.

25847 is tracking support for programmatic configuration of Logback. This issue is a duplicate of that request so I am going to close it. In the meantime, a custom logging system (configured using the system property suggested by @gogo-zby) is your best option.

I will have a try ,thanks. try then ,, this spi is only use init,refresh event still remove my appender