Closed oneillkza closed 4 months ago
Hi @oneillkza, sorry you're struggling with this. Exomiser uses Spring boot to help with these things, so you can fix it easily. The spring boot logging configuration docs can be found here: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.logging
I agree that the default writing out of a file to /tmp isn't ideal, so you fix this by changing the logging file to be written to a file of your choice by un-commenting the line at bottom of the application.properties
file:
### logging ###
## either uncomment this to write the log to logs/exomiser.log
#logging.file.name=logs/exomiser.log
or add this line to the application.properties
### logging ###
logging.config=logback-spring.xml
and ensure the file logback-spring.xml
(or whatever you want to call it) is in the same directory as the exomiser-cli.jar. The logback-spring.xml
file should contain the following configuration:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
<include resource="org/springframework/boot/logging/logback/file-appender.xml" />
<root level="INFO">
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
</root>
<logger name="com.zaxxer.hikari" level="ERROR"/>
</configuration>
I'll change this so that the xml configuration above is the default in the next release.
Thanks! I think that should allow us to get around this for now.
I'd add that we run this in a containerised workflow, so for us we'd need to add a line in the Dockerfile to edit the application.properties. It would definitely be easiest if it were just an option that could be supplied at runtime.
You can supply this at runtime too - just add --logging.config=logback-spring.xml
to your arguments list after all of the exomiser specific commands.
Actually Spring should automatically pickup the logback-spring.xml
from the filesystem first if it's in the same directory as the exomiser-cli-{version}.jar, so you shouldn't need to change any application.properties
or commands.
We've been having the following issue come up. From the exomiser log file:
It looks like spring is trying to create and write to
/tmp/spring.log
, but/tmp
is a shared location on our servers, so this creates clashes if multiple users are running it at the same time, or if one user ran it and the file got created with RO permissions for other users.It sounds like other people have noticed this, and just work around it:
https://www.lbgi.fr/VaRank/Documentation/README.VaRank_latest.pdf
Going around and creating
/tmp/spring.log
on every server and giving it write permissions to everyone is a very hacky solution. The right solution would be to specify this explicitly inlogback-spring.xml
, ie:(Probably "./" would be a reasonable default location.)
Another way to solve this would be to expose the spring logging location as a command-line parameter.
Note that this created a very Byzantine error for us, where a student developed a workflow, but when passed on to a staff member, it just would not run, because on most of our servers the student had already run exomiser, thereby creating
/tmp/spring.log
, and blocking anyone else from running exomiser on that server.