update logging

This commit is contained in:
2025-10-07 14:12:59 +02:00
parent 2738df3bff
commit 44ab3f4622
2 changed files with 4 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ object Main {
conf = new HammerConf(args.toIndexedSeq)
val logLevel = conf.verbose() match {
case 0 => Level.WARN
case 0 => Level.INFO
case 1 => Level.INFO
case 2 => Level.DEBUG
case _ => Level.TRACE
@@ -43,6 +43,7 @@ object Main {
logger.error(s"General exception ${e.getMessage}")
e.printStackTrace()
}
c.cleanup()
case _ =>
logger.error(s"Found no subcommand, see help below")
conf.printHelp()

View File

@@ -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 = {
val command = s"$execPath ${args.flatMap(_.value).mkString(" ")}"
log.info(s"Running external program: ")
log.info(command)
log.debug(s"Running external program: ")
log.debug(command)
val output: os.ProcessOutput = if (Main.conf.printToolOutput())
os.Inherit
else