// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #pragma once #include #include #include "windows_customizations.h" #ifdef EXEC_ENV_OLS #ifndef ENABLE_CUSTOM_LOGGER #define ENABLE_CUSTOM_LOGGER #endif // !ENABLE_CUSTOM_LOGGER #endif // EXEC_ENV_OLS namespace diskann { #ifdef ENABLE_CUSTOM_LOGGER DISKANN_DLLEXPORT extern std::basic_ostream cout; DISKANN_DLLEXPORT extern std::basic_ostream cerr; #else using std::cerr; using std::cout; #endif enum class DISKANN_DLLEXPORT LogLevel { LL_Info = 0, LL_Error, LL_Count }; #ifdef ENABLE_CUSTOM_LOGGER DISKANN_DLLEXPORT void SetCustomLogger(std::function logger); #endif } // namespace diskann