From cf6ac7944d08e64a1392a9ee4ec46a3624732418 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 1 Apr 2018 12:28:32 +1000 Subject: general: Added logging. --- pywal/export.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'pywal/export.py') diff --git a/pywal/export.py b/pywal/export.py index 120150d..ed7a846 100644 --- a/pywal/export.py +++ b/pywal/export.py @@ -1,6 +1,7 @@ """ Export colors in various formats. """ +import logging import os from .settings import CACHE_DIR, MODULE_DIR, CONF_DIR @@ -65,8 +66,8 @@ def every(colors, output_dir=CACHE_DIR): if file.name != '.DS_Store': template(colors, file.path, join(output_dir, file.name)) - print("export: Exported all files.") - print("export: Exported all user files.") + logging.info("Exported all files.") + logging.info("Exported all user files.") def color(colors, export_type, output_file=None): @@ -79,6 +80,6 @@ def color(colors, export_type, output_file=None): if os.path.isfile(template_file): template(all_colors, template_file, output_file) - print("export: Exported %s." % export_type) + logging.info("Exported %s.", export_type) else: - print("warning: template '%s' doesn't exist." % export_type) + logging.warning("Template '%s' doesn't exist.", export_type) -- cgit v1.2.3