mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-16 04:32:33 +00:00
ea73b98fb9
- Rename generic file and identifier names in library-bridge to something more dictionary-specific. This is needed because later on, catboost will be integrated into library-bridge. - Also: Some smaller fixes like typos and un-inlining non-performance critical code. - The logic remains unchanged in this commit.
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#include "ExternalDictionaryLibraryAPI.h"
|
|
|
|
#include <Common/logger_useful.h>
|
|
|
|
namespace
|
|
{
|
|
const char DICT_LOGGER_NAME[] = "LibraryDictionarySourceExternal";
|
|
}
|
|
|
|
void ExternalDictionaryLibraryAPI::log(LogLevel level, CString msg)
|
|
{
|
|
auto & logger = Poco::Logger::get(DICT_LOGGER_NAME);
|
|
switch (level)
|
|
{
|
|
case LogLevel::TRACE:
|
|
if (logger.trace())
|
|
logger.trace(msg);
|
|
break;
|
|
case LogLevel::DEBUG:
|
|
if (logger.debug())
|
|
logger.debug(msg);
|
|
break;
|
|
case LogLevel::INFORMATION:
|
|
if (logger.information())
|
|
logger.information(msg);
|
|
break;
|
|
case LogLevel::NOTICE:
|
|
if (logger.notice())
|
|
logger.notice(msg);
|
|
break;
|
|
case LogLevel::WARNING:
|
|
if (logger.warning())
|
|
logger.warning(msg);
|
|
break;
|
|
case LogLevel::ERROR:
|
|
if (logger.error())
|
|
logger.error(msg);
|
|
break;
|
|
case LogLevel::CRITICAL:
|
|
if (logger.critical())
|
|
logger.critical(msg);
|
|
break;
|
|
case LogLevel::FATAL:
|
|
if (logger.fatal())
|
|
logger.fatal(msg);
|
|
break;
|
|
}
|
|
}
|