Fix task execution andlogging
This commit is contained in:
@@ -32,10 +32,12 @@ object Main {
|
||||
logger.info(s"Executing subcommand ${c.name}")
|
||||
val tasks = c.getRequiredTasks
|
||||
logger.debug(s"Subcommand requires ${tasks.size} tasks")
|
||||
logger.info(s"Validating tasks")
|
||||
tasks.foreach(_.validate())
|
||||
logger.info(s"Executing tasks")
|
||||
tasks.foreach(_.execute())
|
||||
try {
|
||||
tasks.foreach(_.run())
|
||||
} catch {
|
||||
case e: Exception =>
|
||||
logger.error(s"Error during task execution, see above!")
|
||||
}
|
||||
case _ =>
|
||||
logger.error(s"Found no subcommand, see help below")
|
||||
conf.printHelp()
|
||||
|
Reference in New Issue
Block a user