mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 13:25:45 +02:00
bees: trace and log improvements during roots and context startup
Currently if crawl throws an exception, we don't have basic information about what was being crawled or even if the crawler was running at all. These traces also help identify the causes of early exception failures. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
5f0f7a8319
commit
7008c74113
@ -233,6 +233,7 @@ size_t
|
|||||||
BeesRoots::crawl_batch(shared_ptr<BeesCrawl> this_crawl)
|
BeesRoots::crawl_batch(shared_ptr<BeesCrawl> this_crawl)
|
||||||
{
|
{
|
||||||
BEESNOTE("Crawling batch " << this_crawl->get_state_begin());
|
BEESNOTE("Crawling batch " << this_crawl->get_state_begin());
|
||||||
|
BEESTRACE("Crawling batch " << this_crawl->get_state_begin());
|
||||||
auto ctx_copy = m_ctx;
|
auto ctx_copy = m_ctx;
|
||||||
size_t batch_count = 0;
|
size_t batch_count = 0;
|
||||||
auto subvol = this_crawl->get_state_begin().m_root;
|
auto subvol = this_crawl->get_state_begin().m_root;
|
||||||
@ -709,6 +710,7 @@ BeesRoots::open_root(uint64_t rootid)
|
|||||||
bool
|
bool
|
||||||
BeesRoots::is_root_ro_nocache(uint64_t root)
|
BeesRoots::is_root_ro_nocache(uint64_t root)
|
||||||
{
|
{
|
||||||
|
BEESTRACE("checking subvol flags on root " << root);
|
||||||
Fd root_fd = open_root(root);
|
Fd root_fd = open_root(root);
|
||||||
BEESTRACE("checking subvol flags on root " << root << " path " << name_fd(root_fd));
|
BEESTRACE("checking subvol flags on root " << root << " path " << name_fd(root_fd));
|
||||||
|
|
||||||
|
@ -734,6 +734,7 @@ bees_main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Create a context so we can apply configuration to it
|
// Create a context so we can apply configuration to it
|
||||||
shared_ptr<BeesContext> bc = make_shared<BeesContext>();
|
shared_ptr<BeesContext> bc = make_shared<BeesContext>();
|
||||||
|
BEESLOGDEBUG("context constructed");
|
||||||
|
|
||||||
string cwd(readlink_or_die("/proc/self/cwd"));
|
string cwd(readlink_or_die("/proc/self/cwd"));
|
||||||
|
|
||||||
@ -789,6 +790,8 @@ bees_main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BEESLOGDEBUG("Parsing option '" << static_cast<char>(c) << "'");
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
|
||||||
case 'C':
|
case 'C':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user