HotswapProjects / HotswapAgent

Java unlimited redefinition of classes at runtime.
GNU General Public License v2.0
2.36k stars 493 forks source link

Debug logging on info level from different plugins #579

Closed Artur- closed 2 months ago

Artur- commented 2 months ago

When running with HotswapAgent, you pretty quickly lose track of all your real application log output because there is so much output by default. Much of the output seems to be debug type of output from various plugins logged at info level - could this be changed for the whole project somehow so that these kind of logs would not appear all the time ?

HOTSWAP AGENT: 09:55:12.358 INFO (org.hotswap.agent.plugin.spring.core.BeanFactoryProcessor) - create new singleton bean 'webClientHttpConnectorCustomizer' from 'org.springframework.beans.factory.support.DefaultListableBeanFactory@24e8de5c'
HOTSWAP AGENT: 09:55:12.368 INFO (org.hotswap.agent.plugin.spring.reload.SpringBeanReload) - ##### [1th] finish reloading 'org.springframework.beans.factory.support.DefaultListableBeanFactory@24e8de5c', it cost 269ms
HOTSWAP AGENT: 09:55:47.185 INFO (org.hotswap.agent.plugin.spring.reload.SpringBeanReload) - try to add changed class 'com.example.application.services.HelloWorldService' into org.springframework.beans.factory.support.DefaultListableBeanFactory@24e8de5c
HOTSWAP AGENT: 09:55:47.514 INFO (org.hotswap.agent.plugin.jackson.JacksonPlugin) - Reloaded Jackson.
HOTSWAP AGENT: 09:55:48.697 INFO (org.hotswap.agent.plugin.spring.reload.SpringBeanReload) - ##### start reloading 'org.springframework.beans.factory.support.DefaultListableBeanFactory@24e8de5c' with timestamp '1725173746969'
HOTSWAP AGENT: 09:55:48.698 INFO (org.hotswap.agent.plugin.spring.core.BeanFactoryProcessor) - destroy bean 'helloWorldService' from 'org.springframework.beans.factory.support.DefaultListableBeanFactory@24e8de5c'
HOTSWAP AGENT: 09:55:48.734 INFO (org.hotswap.agent.plugin.spring.core.BeanFactoryProcessor) - create new singleton bean 'helloWorldService' from 'org.springframework.beans.factory.support.DefaultListableBeanFactory@24e8de5c'
HOTSWAP AGENT: 09:55:48.749 INFO (org.hotswap.agent.plugin.spring.reload.SpringBeanReload) - ##### [2th] finish reloading 'org.springframework.beans.factory.support.DefaultListableBeanFactory@24e8de5c', it cost 52ms
skybber commented 2 months ago

It is problem in SpringPlugin, that apparently write debug log to info log level. We will fix it. Info level can be disabled now in hotswap-agent.properties by :

LOGGER.org.hotswap.agent.plugin.spring=error

skybber commented 2 months ago

done - will be in 2.0.0!