From: Mikko Rasa Date: Wed, 18 Jul 2012 20:31:40 +0000 (+0300) Subject: Add some logging and remove a stray debug statement X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7ac882d9a3a025bbe77f88803f53eff5c6dad750;p=builder.git Add some logging and remove a stray debug statement --- diff --git a/source/cache.cpp b/source/cache.cpp index 70f4120..087428f 100644 --- a/source/cache.cpp +++ b/source/cache.cpp @@ -76,12 +76,14 @@ void Cache::append_value(const Target *tgt, const string &k, const string &v) i = data.insert(DataMap::value_type(key, ValueList())).first; i->second.push_back(v); changed = true; + package.get_builder().get_logger().log("cache", format("Updated key %s %s+ %s", tgt->get_name(), k, v)); } void Cache::set_values(const Target *tgt, const string &k, const ValueList &v) { data[Key(tgt->get_name(), k)] = v; changed = true; + package.get_builder().get_logger().log("cache", format("Updated key %s %s: %s", tgt->get_name(), k, join(v.begin(), v.end()))); } const string &Cache::get_value(const Target *tgt, const string &k) @@ -119,6 +121,7 @@ void Cache::load() ValueList &values = data[key]; for(unsigned count = read_count(in); count; --count) values.push_back(read_string(in)); + package.get_builder().get_logger().log("cache", format("Loaded key %s %s: %s", key.first, key.second, join(values.begin(), values.end()))); } mtime = st.get_modify_time(); diff --git a/source/filetarget.cpp b/source/filetarget.cpp index 1f25cd1..58e1a7b 100644 --- a/source/filetarget.cpp +++ b/source/filetarget.cpp @@ -54,7 +54,6 @@ string FileTarget::generate_name(Builder &builder, const SourcePackage *pkg, con else if(FS::descendant_depth(path, builder.get_prefix())>=0) { FS::Path relpath = FS::relative(path, builder.get_prefix()); - builder.get_logger().log("debug", format("%s %s %s", path, builder.get_prefix(), relpath)); return ""+relpath.str().substr(1); }