From a7aed7bc63d81ad0aecb6a94b61df62919f68c5b Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 26 Mar 2016 10:25:45 +0000 Subject: [PATCH] Support log levels --- build-data/BuildData.groovy | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build-data/BuildData.groovy b/build-data/BuildData.groovy index cffebaee..73105c34 100755 --- a/build-data/BuildData.groovy +++ b/build-data/BuildData.groovy @@ -23,13 +23,13 @@ new File(dir_data).mkdirs() def input = new URL("https://raw.githubusercontent.com/filebot/data/master/${it}") def output = new File("${dir_data}/${it}") - log.fine input + log.fine "Fetch $input" def lines = new TreeSet(String.CASE_INSENSITIVE_ORDER) input.getText('UTF-8').split(/\R/)*.trim().findAll{ it.length() > 0 }.each{ - lines += Pattern.compile(it).pattern() + lines << Pattern.compile(it).pattern() } - lines.each{ log.finest it } + lines.each{ log.finest "$it" } pack(output, lines) } @@ -170,13 +170,13 @@ omdb.each{ m -> def names = [info.name, info.originalName] + info.alternativeTitles [info?.released?.year, m[2]].findResults{ it?.toInteger() }.unique().each{ y -> def row = [sync, m[0].pad(7), info.id.pad(7), y.pad(4)] + names - log.info row + log.info "Update ${m[0..2]}: $row" tmdb << row } } catch(IllegalArgumentException | FileNotFoundException e) { printException(e, false) def row = [sync, m[0].pad(7), 0, m[2], m[1]] - log.info row + log.info "[BAD] Update ${m[0..2]}: $row" tmdb << row } } @@ -273,7 +273,7 @@ tvdb_updates.values().each{ update -> printException(e, false) def data = [update.time, update.id, '', 0, 0] tvdb.put(update.id, data) - log.info "Update $update => $data" + log.info "[BAD] Update $update => $data" } } }