Files
yichuan520030910320 46f6cc100b Initial commit
2025-06-30 09:05:05 +00:00

36 lines
769 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#pragma once
#include <functional>
#include <iostream>
#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<char> cout;
DISKANN_DLLEXPORT extern std::basic_ostream<char> 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<void(LogLevel, const char *)> logger);
#endif
} // namespace diskann