summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/persist_data.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-10 10:35:31 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:33 +0000
commitecc68fa4fbb579e97ea45156e79a293b073697a0 (patch)
tree6d08682e43476e37ccf48ee14c8d81e208d1c897 /bitbake/lib/bb/persist_data.py
parentd3a45c7d41a88d79389fc40eb68816e4939fb6f9 (diff)
downloadpoky-ecc68fa4fbb579e97ea45156e79a293b073697a0.tar.gz
Switch bitbake internals to use logging directly rather than bb.msg
We use a custom Logger subclass for our loggers This logger provides: - 'debug' method which accepts a debug level - 'plain' method which bypasses log formatting - 'verbose' method which is more detail than info, but less than debug (Bitbake rev: 3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/persist_data.py')
-rw-r--r--bitbake/lib/bb/persist_data.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py
index 00f4929945..17975b64a5 100644
--- a/bitbake/lib/bb/persist_data.py
+++ b/bitbake/lib/bb/persist_data.py
@@ -15,9 +15,13 @@
15# with this program; if not, write to the Free Software Foundation, Inc., 15# with this program; if not, write to the Free Software Foundation, Inc.,
16# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 17
18import bb, os 18import os
19import logging
20import bb
19import bb.utils 21import bb.utils
20 22
23logger = logging.getLogger("BitBake.PersistData")
24
21try: 25try:
22 import sqlite3 26 import sqlite3
23except ImportError: 27except ImportError:
@@ -56,7 +60,7 @@ class PersistData:
56 bb.utils.mkdirhier(self.cachedir) 60 bb.utils.mkdirhier(self.cachedir)
57 61
58 self.cachefile = os.path.join(self.cachedir, "bb_persist_data.sqlite3") 62 self.cachefile = os.path.join(self.cachedir, "bb_persist_data.sqlite3")
59 bb.msg.debug(1, bb.msg.domain.PersistData, "Using '%s' as the persistent data cache" % self.cachefile) 63 logger.debug(1, "Using '%s' as the persistent data cache", self.cachefile)
60 64
61 connection = sqlite3.connect(self.cachefile, timeout=5, isolation_level=None) 65 connection = sqlite3.connect(self.cachefile, timeout=5, isolation_level=None)
62 persistent_database_connection["connection"] = connection 66 persistent_database_connection["connection"] = connection