Replace use of print with Python's logging infrastructure.
[feedingit] / src / FeedingIt-Web.py
index af3395f..3ea91c5 100644 (file)
@@ -11,6 +11,9 @@ from threading import Thread
 from os.path import isfile, isdir, exists
 from os import mkdir, remove, stat, environ
 
+import logging
+logger = logging.getLogger(__name__)
+
 import debugging
 debugging.init(dot_directory=".feedingit", program_name="feedingit-web")
 
@@ -271,7 +274,7 @@ if not isdir(CONFIGDIR):
     try:
         mkdir(CONFIGDIR)
     except:
-        print "Error: Can't create configuration directory"
+        logger.error("Error: Can't create configuration directory")
         from sys import exit
         exit(1)