]> git.tdb.fi Git - builder.git/commitdiff
Add some logging and remove a stray debug statement
authorMikko Rasa <tdb@tdb.fi>
Wed, 18 Jul 2012 20:31:40 +0000 (23:31 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 18 Jul 2012 20:31:40 +0000 (23:31 +0300)
source/cache.cpp
source/filetarget.cpp

index 70f4120d853d9dfb80073c9204e6e448d7089db4..087428fc3cf54cf8341deae68dcb4224b6f3613b 100644 (file)
@@ -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();
index 1f25cd1a9818a283c9e74ba4705d3df2dafd9faa..58e1a7b575fc8cc64306c3ecbaea27b4a688aaca 100644 (file)
@@ -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 "<prefix>"+relpath.str().substr(1);
        }