/* * Copyright (c) Facebook, Inc. and its affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ #pragma once #include #include #include "eden/fs/store/ObjectFetchContext.h" #include "eden/fs/utils/PathFuncs.h" namespace facebook { namespace eden { class UnboundedQueueExecutor; class StructuredLogger; class ProcessNameCache; class BackingStoreLogger { public: BackingStoreLogger( std::shared_ptr logger, std::shared_ptr processNameCache); // for unit tests so that a no-op logger can be passed into the backing store BackingStoreLogger() = default; void logImport( ObjectFetchContext& context, RelativePathPiece importPath, ObjectFetchContext::ObjectType fetchedType); private: std::shared_ptr logger_; std::shared_ptr processNameCache_; // for unit tests so that a no-op logger can be passed into the backing store bool loggingAvailable_ = false; }; } // namespace eden } // namespace facebook