diff options
Diffstat (limited to 'pelican/plugins/htmlmin/minify.py')
-rw-r--r-- | pelican/plugins/htmlmin/minify.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pelican/plugins/htmlmin/minify.py b/pelican/plugins/htmlmin/minify.py index 10e8a4c..ce8c199 100644 --- a/pelican/plugins/htmlmin/minify.py +++ b/pelican/plugins/htmlmin/minify.py @@ -23,6 +23,8 @@ def run(pelican): 'remove_comments': True, 'remove_all_empty_space': True, 'remove_optional_attribute_quotes': False}) + for key, value in options.items(): + logger.debug('htmlmin: using option: %s = %s', key, value) htmlfile = re.compile( pelican.settings.get('HTMLMIN_MATCH', r'.html?$')) @@ -45,12 +47,13 @@ def worker(filepath, options): rawhtml = page.read() with open(filepath, 'w', encoding='utf-8') as page: - logger.debug('Minifying: %s', filepath) + logger.debug('htmlmin: Minifying %s', filepath) try: compressed = htmlmin.minify(rawhtml, **options) page.write(compressed) except Exception as e: - logger.critical('Minification failed: %s', e) + logger.critical('htmlmin: Failed to minify %s: %s', + filepath, e) def register(): |