genome-nexus / genome-nexus-annotation-pipeline

Library and tool for annotating MAF files using Genome Nexus Webserver API
MIT License
8 stars 27 forks source link

Turn on logging for genome-nexus runs #244

Closed japerez-cls closed 1 year ago

japerez-cls commented 1 year ago

Hello,

I would like to change the logging threshold to debug so I can figure out why my annotations are failing. I see the following console output using a minimal example test run:

docker run -v ${PWD}:/wd genomenexus/gn-annotation-pipeline:master --filename /wd/scratch/minimal_example.in.txt --output-filename /wd/scratch/minimal_example.out.txt
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  _____                                               _   _                             
 / ____|                                             | \ | |                            
| |  __    ___   _ __     ___    _ __ ___     ___    |  \| |   ___  __  __  _   _   ___ 
| | |_ |  / _ \ | '_ \   / _ \  | '_ ` _ \   / _ \   | . ` |  / _ \ \ \/ / | | | | / __|
| |__| | |  __/ | | | | | (_) | | | | | | | |  __/   | |\  | |  __/  >  <  | |_| | \__ \
 \_____|  \___| |_| |_|  \___/  |_| |_| |_|  \___|   |_| \_|  \___| /_/\_\  \__,_| |___/

Annotation Summary:
        Records with ambiguous SNP and INDEL allele changes:  0

        Failed annotations summary:  3 total failed annotations
                Records with HGVSp null variant classification:  0
                Records that failed due to other unknown reason: 3

        Average Response Time:  1.000 sec.
          Total Response Time:  1 sec.

 RUNTIME: 46 secs.

The line log4j:WARN No appenders could be found for logger seems to indicate the log4j.properties file can not be found and the application instead performs no explicit configuration (https://logging.apache.org/log4j/1.2/faq.html#noconfig).

I tried making own image, disabling the entrypoint and running the jar in an interactive shell with:

cd /genome-nexus-annotation-pipeline
$JAVA_HOME/bin/java -cp "/genome-nexus-annotation-pipeline/annotationPipeline/src/main/resources" -Dlog4j.configuration=log4j.properties -jar annotationPipeline/target/annotationPipeline.jar -f /mnt/docker-sandbox-data/scratch/minimal_example.in.txt -o /mnt/docker-sandbox-data/annotate_output/scratch/minimal_example.out.txt

or

$JAVA_HOME/bin/java -Dlog4j.configuration=/genome-nexus-annotation-pipeline/annotationPipeline/src/main/resources/log4j.properties -jar annotationPipeline/target/annotationPipeline.jar -f /mnt/docker-sandbox-data/scratch/minimal_example.in.txt -o /mnt/docker-sandbox-data/annotate_output/scratch/minimal_example.out.txt

to no avail.

Any help on this front?