From 6e0d5ac70d0dc92b3b89d830202e791ba9c23aa0 Mon Sep 17 00:00:00 2001
From: Alessandro Cerioni <acerioni@grandlyon.com>
Date: Thu, 16 May 2019 18:14:59 +0200
Subject: [PATCH] Improved log messages

---
 utils/fix_links.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/fix_links.py b/utils/fix_links.py
index 0b8160f..cb8e4af 100644
--- a/utils/fix_links.py
+++ b/utils/fix_links.py
@@ -101,7 +101,7 @@ def fix_links( links, credentials=None ):
                 with_credentials = False
                 for domain in credentials:
                     if domain in link['url'] and credentials[domain]['username'] != None and credentials[domain]['password']:
-                        logging.info('Found a valid credential.')
+                        logging.info('Found a valid credential for %s' % link['url'])
                         with_credentials = True
                         username = credentials[domain]['username']
                         password = credentials[domain]['password']
@@ -130,7 +130,7 @@ def fix_links( links, credentials=None ):
                 fixed_links[k]['protocol'] = translate_content_type(resp.headers['Content-Type'])
 
             except Exception as e:
-                logging.debug(e)
+                logging.debug('Did not manage to HEAD %s (%s)' % (link['url'], e))
 
                 # ...otherwise, we make a guess on the basis of the information carried by the URL
                 known_formats = ['ecw', 'pdf', 'zip', 'json', 'tif', 'tiff', 'csv']
-- 
GitLab