Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
Update: July 26, 2019
This section of the forum is now closed; we are working on a new support model for WDL that we will share here shortly. For Cromwell-specific issues, see the Cromwell docs and post questions on Github.
This section of the forum is now closed; we are working on a new support model for WDL that we will share here shortly. For Cromwell-specific issues, see the Cromwell docs and post questions on Github.
color in the output to screen from cromwell run

The output to screen from java -jar cromwell-28.jar run ...
contains color for different type of info, making it easier to read. But those from java -Dconfig.file=cromwell.config.0.txt -jar cromwell-28.jar run
does not have any color. How to add color to the output in this care?
Thanks!
Best Answers
-
jgentry ✭✭✭
@blueskypy What are the contents of
cromwell.config.0.txt
?The color highlighting comes from the
PRETTY
logging mode: https://github.com/broadinstitute/cromwell#logging -
mcovarr Cambridge, MA ✭✭
What's your command line? This works for me:
java -DLOG_MODE=pretty -jar /path/to/cromwell.jar server
or with sbt:
sbt -J-DLOG_MODE=pretty "run server"
-
mcovarr Cambridge, MA ✭✭
Okay. It's best to make the minor changes in a separate file and then
include "application"
at the top and then-Dconfig.file=...
that file.
Answers
@blueskypy What are the contents of
cromwell.config.0.txt
?The color highlighting comes from the
PRETTY
logging mode: https://github.com/broadinstitute/cromwell#logging@jgentry the
cromwell.config.0.txt
is the ref config file in the github sitecore/src/main/resources/reference.conf
. Iexport LOG_MODE="pretty"
, but it doesn't make any difference.-DLOG_MODE=pretty
on the command line works for me.You shouldn't need to add
-Dconfig.file=...
if you're just using the reference config.Thanks @mcovarr ! but adding
-DLOG_MODE=pretty
doesn't make a difference either.What's your command line? This works for me:
or with sbt:
Thanks @mcovarr ! Here is my command line:
java -Dconfig.file=cromwell.config.0.txt -DLOG_MODE=pretty -jar cromwell-29.jar run h2.wdl -i h2.json
cromwell.config.0.txt
is just the reference config file in the github. Without-Dconfig.file
, the log is colored without setting-DLOG_MODE
in my case.I'm just trying to find out how to make the log colored when
-Dconfig.file
is set.Could you please link to exactly which conf file you're using in GitHub? Thanks.
Thanks @mcovarr ! Here is the file
Okay I think the problem is that pointing to the reference.conf explicitly cuts out the application.conf, which is where this setup happens:
So if you need to use a custom config file, just have
include "application"
as the first line.Thanks @mcovarr ! I downloaded the application.conf
In
cromwell.config.0.txt
, addinginclude "application"
orinclude "application.conf"
on the top does not give color to the logging; addinginclude required("application")
leads to errorIf
cromwell.config.0.txt
is just the reference.conf, you shouldn't do the-Dconfig.file=cromwell.config.0.txt
on the command line. If you do have your own overrides in a separate file, then you can haveinclude "application"
at the top.@mcovarr ,
cromwell.config.0.txt
is the reference.conf with a few minor changes by me.Okay. It's best to make the minor changes in a separate file and then
include "application"
at the top and then-Dconfig.file=...
that file.Thanks @mcovarr ! Just a few more questions:
1. what's the difference among
include "application"
,include "application.conf"
,include required("application")
?2. do I need to download and keep application.conf in the same dir?
include "application"
; I don't know what those other forms do.application.conf
, the one that's baked into the Cromwell jar should work fine from there.The Cromwell docs suggest the
include required(classpath("application"))
method. I'll poke @kshakir to give us the full details but I'd be inclined to follow the Cromwell docs unless there's a reason not to.Thanks @ChrisL for chipping in! The cromwell.examples.conf uses
include required("application")
. But based on my testing, it leads to errorBut
include required(classpath("application"))
does not have that error.Thanks @blueskypy - I'll fix that line in the
cromwell.examples.conf
Thanks Chris!
@ChrisL , same error also exists at line 7 of reference.conf