From 3f92799759129526cb8adfce7c180ccbec5463cc Mon Sep 17 00:00:00 2001
From: Manuel Guenther <manuel.guenther@idiap.ch>
Date: Tue, 30 Apr 2013 14:10:33 +0200
Subject: [PATCH] Enabled the logging system in the DCT-UBM exmple.

---
 faceverify/dct_ubm.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/faceverify/dct_ubm.py b/faceverify/dct_ubm.py
index fcc0734..fe2a72b 100644
--- a/faceverify/dct_ubm.py
+++ b/faceverify/dct_ubm.py
@@ -24,6 +24,15 @@ import os, sys
 import numpy
 from matplotlib import pyplot
 
+# setup the logging system
+import logging
+formatter = logging.Formatter("%(name)s@%(asctime)s -- %(levelname)s: %(message)s")
+logger = logging.getLogger("bob")
+for handler in logger.handlers:
+  handler.setFormatter(formatter)
+logger.setLevel(logging.INFO)
+
+
 # This is the base directory where by default the AT&T images are found. You can
 # overwrite this  directory on the command line
 global ATNT_IMAGE_DIRECTORY
-- 
GitLab