update logging
This commit is contained in:
@@ -16,7 +16,7 @@ object Main {
|
|||||||
conf = new HammerConf(args.toIndexedSeq)
|
conf = new HammerConf(args.toIndexedSeq)
|
||||||
|
|
||||||
val logLevel = conf.verbose() match {
|
val logLevel = conf.verbose() match {
|
||||||
case 0 => Level.WARN
|
case 0 => Level.INFO
|
||||||
case 1 => Level.INFO
|
case 1 => Level.INFO
|
||||||
case 2 => Level.DEBUG
|
case 2 => Level.DEBUG
|
||||||
case _ => Level.TRACE
|
case _ => Level.TRACE
|
||||||
@@ -43,6 +43,7 @@ object Main {
|
|||||||
logger.error(s"General exception ${e.getMessage}")
|
logger.error(s"General exception ${e.getMessage}")
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
|
c.cleanup()
|
||||||
case _ =>
|
case _ =>
|
||||||
logger.error(s"Found no subcommand, see help below")
|
logger.error(s"Found no subcommand, see help below")
|
||||||
conf.printHelp()
|
conf.printHelp()
|
||||||
|
@@ -20,8 +20,8 @@ trait TaskImpl[T <: Task : ClassTag] extends Task with Logging[T] {
|
|||||||
|
|
||||||
def runExecutable(execPath: Path, args: Shellable*)(logFile: os.Path): os.CommandResult = {
|
def runExecutable(execPath: Path, args: Shellable*)(logFile: os.Path): os.CommandResult = {
|
||||||
val command = s"$execPath ${args.flatMap(_.value).mkString(" ")}"
|
val command = s"$execPath ${args.flatMap(_.value).mkString(" ")}"
|
||||||
log.info(s"Running external program: ")
|
log.debug(s"Running external program: ")
|
||||||
log.info(command)
|
log.debug(command)
|
||||||
val output: os.ProcessOutput = if (Main.conf.printToolOutput())
|
val output: os.ProcessOutput = if (Main.conf.printToolOutput())
|
||||||
os.Inherit
|
os.Inherit
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user