aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-modules
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-11-15 10:38:39 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-11-15 11:15:21 +0000
commitbcae9f4ab8743c9d6886944108fe133816cb486d (patch)
tree73702cee8af3070d7c046d31c99ff3d8dfe9b6cd /pbuilder-modules
parente2420f46582fb7761d04ed86c2201dd79a857e51 (diff)
downloadpbuilder-bcae9f4ab8743c9d6886944108fe133816cb486d.tar
pbuilder-bcae9f4ab8743c9d6886944108fe133816cb486d.tar.gz
make the output level configurable through LOGLEVEL (--loglevel)
valid values are D/I/W/E Closes: #490184
Diffstat (limited to 'pbuilder-modules')
-rw-r--r--pbuilder-modules19
1 files changed, 14 insertions, 5 deletions
diff --git a/pbuilder-modules b/pbuilder-modules
index 9b5819d..2a5a1fe 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -117,15 +117,24 @@ function log() {
}
log.e() {
- log "E: $*"
+ case "$LOGLEVEL" in
+ D|I|W|E) log "E: $*" ;;
+ esac
}
-
log.w() {
- log "W: $*"
+ case "$LOGLEVEL" in
+ D|I|W) log "W: $*" ;;
+ esac
}
-
log.i() {
- log "I: $*"
+ case "$LOGLEVEL" in
+ D|I) log "I: $*" ;;
+ esac
+}
+log.d() {
+ case "$LOGLEVEL" in
+ D) log "D: $*" ;;
+ esac
}
# test whether a directory is empty