sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

$java.io.tmpdir/spring.log created despite of logging.file.name being set

Open 2019-05-10 opened this issue 4 years ago • 4 comments

Describe the bug Current Springtools create in java.io.tmpdir a file spring.log with the sole content

2021-04-12 16:24:19.962 INFO 183790 --- [restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable

In application.properties the setting logging.file.name exists and the file configured there is created as well, with all other log statements after one quoted above.

Looks to me like STS is too slow to read the configuration and use it accordingly.

2019-05-10 avatar Apr 12 '21 14:04 2019-05-10

It sounds to me like this happens when you run a Spring Boot application from your Spring Tools 4 for Eclipse IDE. Is that correct? If so, can you provide a sample application and a few steps that describe how to reproduce this behavior? (I don't see a file called spring.log being created in the tmp dir, therefore a sample would help here). Thanks!

martinlippert avatar Apr 13 '21 07:04 martinlippert

Would also be interesting to see if the same happens if you start the app from the command line. Would be great if you could try that, too.

martinlippert avatar Apr 13 '21 07:04 martinlippert

Happens always -- and is caused by the sudden appearance of logback.xml in my projects. That file definitely did not exist previously and I didn't create it either. Once I deleted that file, things went back to normal.

I can't say whether the file was created by Spring/Spring Boot somehow, or rather by the latest STS update. Given the timing I suspect STS.

2019-05-10 avatar May 04 '21 10:05 2019-05-10

Can you provide a sample project and a few steps to reproduce this? That would be awesome.

Since I am not aware of anything within the tooling that automatically would create this file for you (at least nothing from within the Spring Tools), we need to reproduce this somehow and analyze it in more depth from there.

martinlippert avatar May 05 '21 09:05 martinlippert