Add DEBUG_TRACE output to file utility functions in libpbd
This commit is contained in:
parent
550eeecc63
commit
ccdc6fcd6a
@ -49,6 +49,7 @@ uint64_t PBD::DEBUG::FileManager = PBD::new_debug_bit ("filemanager");
|
||||
uint64_t PBD::DEBUG::Pool = PBD::new_debug_bit ("pool");
|
||||
uint64_t PBD::DEBUG::EventLoop = PBD::new_debug_bit ("eventloop");
|
||||
uint64_t PBD::DEBUG::AbstractUI = PBD::new_debug_bit ("abstractui");
|
||||
uint64_t PBD::DEBUG::FileUtils = PBD::new_debug_bit ("fileutils");
|
||||
|
||||
uint64_t PBD::debug_bits = 0x0;
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
|
||||
#include "pbd/compose.h"
|
||||
#include "pbd/file_utils.h"
|
||||
#include "pbd/debug.h"
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/pathscanner.h"
|
||||
#include "pbd/stl_delete.h"
|
||||
@ -80,6 +81,11 @@ find_matching_files_in_directory (const std::string& directory,
|
||||
std::string full_path(directory);
|
||||
full_path = Glib::build_filename (full_path, *file_iter);
|
||||
|
||||
DEBUG_TRACE (
|
||||
DEBUG::FileUtils,
|
||||
string_compose("Found file %1\n", full_path)
|
||||
);
|
||||
|
||||
result.push_back(full_path);
|
||||
}
|
||||
}
|
||||
@ -117,24 +123,28 @@ find_file_in_search_path(const SearchPath& search_path,
|
||||
|
||||
if (tmp.size() == 0)
|
||||
{
|
||||
DEBUG_TRACE (
|
||||
DEBUG::FileUtils,
|
||||
string_compose("No file matching %1 found in Path: %2\n", filename, search_path.to_string())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (tmp.size() != 1)
|
||||
{
|
||||
info << string_compose
|
||||
(
|
||||
"Found more than one file matching %1 in search path %2",
|
||||
filename,
|
||||
search_path ()
|
||||
)
|
||||
<< endmsg;
|
||||
DEBUG_TRACE (
|
||||
DEBUG::FileUtils,
|
||||
string_compose("Found more that one file matching %1 in Path: %2\n", filename, search_path.to_string())
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
result = tmp.front();
|
||||
|
||||
DEBUG_TRACE (
|
||||
DEBUG::FileUtils,
|
||||
string_compose("Found file %1 in Path: %2\n", filename, search_path.to_string())
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@ namespace PBD {
|
||||
extern uint64_t Pool;
|
||||
extern uint64_t EventLoop;
|
||||
extern uint64_t AbstractUI;
|
||||
extern uint64_t FileUtils;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user