Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure folly for logging CacheLib #329

Open
vaavaav opened this issue Jul 25, 2024 · 0 comments
Open

How to configure folly for logging CacheLib #329

vaavaav opened this issue Jul 25, 2024 · 0 comments

Comments

@vaavaav
Copy link

vaavaav commented Jul 25, 2024

So, I noticed CacheLib uses folly to log many parts of the workflow (XLOG, XLOGN, XLOG_IF, ...).
In examples/simple_cache, I'm trying to configure folly so that logging goes to a file like so:

int main(int argc, char** argv) {
  folly::init(&argc, &argv);
  folly::LoggerDB::get().registerHandlerFactory(
      std::make_unique<folly::FileHandlerFactory>());
  folly::initLogging("INFO;default=file:path=cachelib.log");

The file gets created, but it's always empty. I'm guessing that this folly configuration is not propagated to CacheLib or logging is disabled inside CacheLib.

I have tried many variations and followed some of the explanations/examples from the folly repo, but nothing works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant