eden: allow buck v2-compatible log category in log test

Summary:
Buck v2 builds from the root of the repo, not the current cell. This means that
the inferred logger name ends up being different.

We're going to need to fix this generally because otherwise it'll change logger
names for everyone (I'm tracking this in T93776519), but in the interest of not
having one Eden test arbitrarily failing on Buck v2 let's update this
with a workaround for now.

Reviewed By: genevievehelsel

Differential Revision: D29270388

fbshipit-source-id: 6968d9b6195a5eed7bd4018b161e12d88f78a421
This commit is contained in:
Thomas Orozco 2021-06-22 04:42:20 -07:00 committed by Facebook GitHub Bot
parent 7cf93a723f
commit f747bef553

View File

@ -227,6 +227,11 @@ TEST_F(PeriodicTaskTest, slowTask) {
.getCategory("eden/fs/service/PeriodicTask")
->addHandler(logHandler);
// TODO(T93776519) remove once Buck v2 strips the fbcode prefix.
folly::LoggerDB::get()
.getCategory("fbcode/eden/fs/service/PeriodicTask")
->addHandler(logHandler);
// Schedule a slow periodic task.
// We test to make sure that log messages are generated about the fact that it
// runs slowly.