Skip to content

Commit

Permalink
[#717] update logging levels
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-semenets committed Jan 15, 2019
1 parent a305eea commit 562ddfc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions legion_test/bin/cleanup_nexus_repo
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_builds(nexus_url, repository, user, password, build_name):
builds = []
try:
url = NEXUS_SEARCH_URL.format(host=nexus_url)
log.info('Fetching Nexus artifacts from URL {}'.format(url))
log.debug('Fetching Nexus artifacts from URL {}'.format(url))
response = requests.get(url, params=search_filters, auth=(user, password))
if response.status_code not in allowed_responce_codes:
raise Exception("Non 200 response from Nexus!")
Expand All @@ -73,7 +73,7 @@ def get_builds(nexus_url, repository, user, password, build_name):
continuation_token = response_data.get('continuationToken')

while continuation_token is not None:
log.info('Fetching Nexus artifacts from URL {} (from {})'.format(url, continuation_token))
log.debug('Fetching Nexus artifacts from URL {} (from {})'.format(url, continuation_token))
search_filters["continuationToken"] = continuation_token
response = requests.get(url, params=search_filters, auth=(user, password))
if response.status_code not in allowed_responce_codes:
Expand Down Expand Up @@ -157,7 +157,7 @@ def delete_builds(nexus_url, user, password, builds, dry_run):
else:
for build in builds:
try:
log.info("Deleting {}-{}-{}...".format(
log.debug("Deleting {}-{}-{}...".format(
build.get("name"),
build.get("version"),
build.get("id")))
Expand Down Expand Up @@ -247,7 +247,7 @@ if __name__ == '__main__':
if args.verbose:
log_level = logging.DEBUG
else:
log_level = logging.ERROR
log_level = logging.INFO
logging.basicConfig(level=log_level, format='%(asctime)s - %(levelname)s - %(message)s')

try:
Expand Down

0 comments on commit 562ddfc

Please sign in to comment.