diff options
author | Tobias Roeser <le.petit.fou@web.de> | 2018-10-29 22:10:25 +0100 |
---|---|---|
committer | Tobias Roeser <le.petit.fou@web.de> | 2018-10-30 09:31:42 +0100 |
commit | 93ffab54211c3150b4c3568d75519dc6426f6044 (patch) | |
tree | 109bd12e793d8e5c3b969b229db3ff712e1a85d3 /main/src/mill/MillMain.scala | |
parent | c92eb6f6f2c482e9fe838bc0f4de97d7c2c19646 (diff) | |
download | mill-93ffab54211c3150b4c3568d75519dc6426f6044.tar.gz mill-93ffab54211c3150b4c3568d75519dc6426f6044.tar.bz2 mill-93ffab54211c3150b4c3568d75519dc6426f6044.zip |
Added new cmdline option --debug,-d to enable debug log
Diffstat (limited to 'main/src/mill/MillMain.scala')
-rw-r--r-- | main/src/mill/MillMain.scala | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/main/src/mill/MillMain.scala b/main/src/mill/MillMain.scala index 421b9f20..1598d5f3 100644 --- a/main/src/mill/MillMain.scala +++ b/main/src/mill/MillMain.scala @@ -64,8 +64,18 @@ object MillMain { } ) + var debugLog = false + val debugLogSignature = Arg[Config, Unit]( + name = "debug", shortName = Some('d'), + doc = "Show debug output on STDOUT", + (c, v) => { + debugLog = true + c + } + ) + val millArgSignature = - Cli.genericSignature.filter(a => !removed(a.name)) ++ Seq(interactiveSignature, disableTickerSignature) + Cli.genericSignature.filter(a => !removed(a.name)) ++ Seq(interactiveSignature, disableTickerSignature, debugLogSignature) Cli.groupArgs( args.toList, @@ -105,7 +115,8 @@ object MillMain { | interp.colors(), | repl.pprinter(), | build.millSelf.get, - | build.millDiscover + | build.millDiscover, + | $debugLog |) |repl.pprinter() = replApplyHandler.pprinter |import replApplyHandler.generatedEval._ @@ -120,7 +131,8 @@ object MillMain { stdout, stderr, stdin, stateCache, env, - setIdle + setIdle, + debugLog ) if (mill.main.client.Util.isJava9OrAbove) { |