diff --git a/artefact.inc.php b/artefact.inc.php index ce6a700..6571089 100644 --- a/artefact.inc.php +++ b/artefact.inc.php @@ -43,6 +43,7 @@ class TaskmanArtefact if(isset($this->sources_fn[$idx])) { $fn = $this->sources_fn[$idx]; + \taskman\log(2, "Task '{$this->task->getName()}' artefact '{$this->path}' resolving sources at $idx\n"); $sources = $fn(); $this->sources[$idx] = $sources; return $sources; @@ -69,6 +70,7 @@ class TaskmanArtefact if(isset($this->sources_changed_fn[$idx])) { $fn = $this->sources_changed_fn[$idx]; + \taskman\log(2, "Task '{$this->task->getName()}' artefact '{$this->path}' resolving changed sources at $idx\n"); $changed = $fn(); $this->sources_changed[$idx] = $changed; return $changed; diff --git a/internal.inc.php b/internal.inc.php index 8d8cf4d..c651dc5 100644 --- a/internal.inc.php +++ b/internal.inc.php @@ -202,6 +202,14 @@ function _process_argv(array &$argv) { $TASKMAN_LOG_LEVEL = -1; } + else if($v == '-l') + { + if(!isset($argv[$i+1])) + throw new \taskman\TaskmanException("Log level is missing"); + + $TASKMAN_LOG_LEVEL = intval($argv[$i+1]); + ++$i; + } else if($v == '-O') { $TASKMAN_NO_DEPS = true;