diff --git a/Analyzer/Analyzer.h b/Analyzer/Analyzer.h index 8cd71b189b..329b0316cb 100644 --- a/Analyzer/Analyzer.h +++ b/Analyzer/Analyzer.h @@ -24,7 +24,7 @@ #ifndef ANALYZER_H #define ANALYZER_H -#include "../Shared/Logger.h" +#include "../Logger/Logger.h" #include #include diff --git a/Archive/S3Archive.cpp b/Archive/S3Archive.cpp index 316c06fbbc..2c5cb2913b 100644 --- a/Archive/S3Archive.cpp +++ b/Archive/S3Archive.cpp @@ -26,7 +26,7 @@ #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" int S3Archive::awsapi_count; std::mutex S3Archive::awsapi_mtx; diff --git a/CMakeLists.txt b/CMakeLists.txt index 05dbcb92bc..377e9f99ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -579,6 +579,7 @@ add_subdirectory(QueryEngine) add_subdirectory(DataMgr) add_subdirectory(CudaMgr) add_subdirectory(LockMgr) +add_subdirectory(Logger) add_subdirectory(MigrationMgr) add_subdirectory(Fragmenter) add_subdirectory(Shared) @@ -599,7 +600,7 @@ if(ENABLE_ODBC) add_subdirectory(ODBC) endif() -set(MAPD_LIBRARIES Shared Catalog SqliteConnector MigrationMgr TableArchiver Parser Analyzer ImportExport QueryRunner QueryEngine QueryState LockMgr DataMgr Fragmenter) +set(MAPD_LIBRARIES Shared Catalog SqliteConnector MigrationMgr TableArchiver Parser Analyzer ImportExport QueryRunner QueryEngine QueryState LockMgr DataMgr Fragmenter Logger) if("${MAPD_EDITION_LOWER}" STREQUAL "ee") list(APPEND MAPD_LIBRARIES Distributed) diff --git a/Calcite/Calcite.cpp b/Calcite/Calcite.cpp index ffc6fce560..e4dfb9f0c2 100644 --- a/Calcite/Calcite.cpp +++ b/Calcite/Calcite.cpp @@ -23,7 +23,7 @@ #include "Calcite.h" #include "Catalog/Catalog.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "Shared/SystemParameters.h" #include "Shared/ThriftClient.h" #include "Shared/fixautotools.h" diff --git a/Catalog/DBObject.h b/Catalog/DBObject.h index 265682b1c3..8d7e80358c 100644 --- a/Catalog/DBObject.h +++ b/Catalog/DBObject.h @@ -31,7 +31,7 @@ #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" namespace Catalog_Namespace { class Catalog; diff --git a/Catalog/Grantee.h b/Catalog/Grantee.h index 448667218e..52afdf9543 100644 --- a/Catalog/Grantee.h +++ b/Catalog/Grantee.h @@ -24,7 +24,7 @@ #include #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" class User; class Role; diff --git a/Catalog/OptionsContainer.h b/Catalog/OptionsContainer.h index 2bef612e88..1a0f407635 100644 --- a/Catalog/OptionsContainer.h +++ b/Catalog/OptionsContainer.h @@ -23,6 +23,7 @@ #include "rapidjson/stringbuffer.h" #include "rapidjson/writer.h" +#include "Logger/Logger.h" #include "Shared/StringTransform.h" namespace foreign_storage { diff --git a/Catalog/SharedDictionaryValidator.cpp b/Catalog/SharedDictionaryValidator.cpp index a10375d190..3cf0405d80 100644 --- a/Catalog/SharedDictionaryValidator.cpp +++ b/Catalog/SharedDictionaryValidator.cpp @@ -18,7 +18,7 @@ #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" const Parser::SharedDictionaryDef compress_reference_path( Parser::SharedDictionaryDef cur_node, diff --git a/CudaMgr/CudaMgr.cpp b/CudaMgr/CudaMgr.cpp index 0aee0da58b..82300d8102 100644 --- a/CudaMgr/CudaMgr.cpp +++ b/CudaMgr/CudaMgr.cpp @@ -23,7 +23,7 @@ #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" namespace CudaMgr_Namespace { diff --git a/CudaMgr/CudaMgr.h b/CudaMgr/CudaMgr.h index fc7efaa7c4..d3a591ad4c 100644 --- a/CudaMgr/CudaMgr.h +++ b/CudaMgr/CudaMgr.h @@ -20,8 +20,8 @@ #include #include +#include "Logger/Logger.h" #include "Shared/DeviceGroup.h" -#include "Shared/Logger.h" #ifdef HAVE_CUDA #include diff --git a/CudaMgr/CudaMgrNoCuda.cpp b/CudaMgr/CudaMgrNoCuda.cpp index 45ebf4ae35..229af89338 100644 --- a/CudaMgr/CudaMgrNoCuda.cpp +++ b/CudaMgr/CudaMgrNoCuda.cpp @@ -15,7 +15,7 @@ */ #include "CudaMgr.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" namespace CudaMgr_Namespace { diff --git a/DataMgr/AbstractBuffer.h b/DataMgr/AbstractBuffer.h index f1b82df67c..ee4dde5e39 100644 --- a/DataMgr/AbstractBuffer.h +++ b/DataMgr/AbstractBuffer.h @@ -31,7 +31,7 @@ #include "Encoder.h" #include "MemoryLevel.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "Shared/sqltypes.h" #include "Shared/types.h" diff --git a/DataMgr/Allocators/CudaAllocator.cpp b/DataMgr/Allocators/CudaAllocator.cpp index 6ddbfa684a..4b6502637b 100644 --- a/DataMgr/Allocators/CudaAllocator.cpp +++ b/DataMgr/Allocators/CudaAllocator.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include CudaAllocator::CudaAllocator(Data_Namespace::DataMgr* data_mgr, const int device_id) diff --git a/DataMgr/Allocators/DeviceAllocator.h b/DataMgr/Allocators/DeviceAllocator.h index 93712330d3..3234fa73e6 100644 --- a/DataMgr/Allocators/DeviceAllocator.h +++ b/DataMgr/Allocators/DeviceAllocator.h @@ -22,7 +22,7 @@ #pragma once -#include "Shared/Logger.h" +#include "Logger/Logger.h" #ifdef HAVE_CUDA #include diff --git a/DataMgr/Allocators/ThrustAllocator.cpp b/DataMgr/Allocators/ThrustAllocator.cpp index d8d3dd11eb..5268e176a2 100644 --- a/DataMgr/Allocators/ThrustAllocator.cpp +++ b/DataMgr/Allocators/ThrustAllocator.cpp @@ -24,7 +24,7 @@ #include "CudaMgr/CudaMgr.h" #include "DataMgr/Allocators/CudaAllocator.h" #include "DataMgr/DataMgr.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" int8_t* ThrustAllocator::allocate(std::ptrdiff_t num_bytes) { VLOG(1) << "Thrust allocation: Device #" << device_id_ << " Allocation #" diff --git a/DataMgr/ArrayNoneEncoder.h b/DataMgr/ArrayNoneEncoder.h index 15cb416c50..d2982af020 100644 --- a/DataMgr/ArrayNoneEncoder.h +++ b/DataMgr/ArrayNoneEncoder.h @@ -24,7 +24,7 @@ #ifndef ARRAY_NONE_ENCODER_H #define ARRAY_NONE_ENCODER_H -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/DataMgr/BufferMgr/Buffer.cpp b/DataMgr/BufferMgr/Buffer.cpp index 24f4932f4f..dc12367fbc 100644 --- a/DataMgr/BufferMgr/Buffer.cpp +++ b/DataMgr/BufferMgr/Buffer.cpp @@ -20,7 +20,7 @@ #include #include "DataMgr/BufferMgr/BufferMgr.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" namespace Buffer_Namespace { diff --git a/DataMgr/BufferMgr/BufferMgr.cpp b/DataMgr/BufferMgr/BufferMgr.cpp index e2d12c2e1c..0d3974d6ab 100644 --- a/DataMgr/BufferMgr/BufferMgr.cpp +++ b/DataMgr/BufferMgr/BufferMgr.cpp @@ -26,7 +26,7 @@ #include #include "DataMgr/BufferMgr/Buffer.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "Shared/measure.h" using namespace std; diff --git a/DataMgr/BufferMgr/CpuBufferMgr/CpuBuffer.cpp b/DataMgr/BufferMgr/CpuBufferMgr/CpuBuffer.cpp index 6105223105..13bd8a4bdf 100644 --- a/DataMgr/BufferMgr/CpuBufferMgr/CpuBuffer.cpp +++ b/DataMgr/BufferMgr/CpuBufferMgr/CpuBuffer.cpp @@ -20,7 +20,7 @@ #include #include "CudaMgr/CudaMgr.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" namespace Buffer_Namespace { diff --git a/DataMgr/BufferMgr/GpuCudaBufferMgr/GpuCudaBuffer.cpp b/DataMgr/BufferMgr/GpuCudaBufferMgr/GpuCudaBuffer.cpp index 892dd42740..1866f6ce31 100644 --- a/DataMgr/BufferMgr/GpuCudaBufferMgr/GpuCudaBuffer.cpp +++ b/DataMgr/BufferMgr/GpuCudaBufferMgr/GpuCudaBuffer.cpp @@ -19,7 +19,7 @@ #include #include "CudaMgr/CudaMgr.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" namespace Buffer_Namespace { diff --git a/DataMgr/BufferMgr/GpuCudaBufferMgr/GpuCudaBufferMgr.cpp b/DataMgr/BufferMgr/GpuCudaBufferMgr/GpuCudaBufferMgr.cpp index 1c9bb78d32..eb67eda80f 100644 --- a/DataMgr/BufferMgr/GpuCudaBufferMgr/GpuCudaBufferMgr.cpp +++ b/DataMgr/BufferMgr/GpuCudaBufferMgr/GpuCudaBufferMgr.cpp @@ -18,7 +18,7 @@ #include "CudaMgr/CudaMgr.h" #include "DataMgr/BufferMgr/GpuCudaBufferMgr/GpuCudaBuffer.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" namespace Buffer_Namespace { diff --git a/DataMgr/ChunkMetadata.h b/DataMgr/ChunkMetadata.h index 74f8b9e13a..9934f6dd7b 100644 --- a/DataMgr/ChunkMetadata.h +++ b/DataMgr/ChunkMetadata.h @@ -20,7 +20,7 @@ #include "../Shared/sqltypes.h" #include "Shared/types.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" struct ChunkStats { Datum min; diff --git a/DataMgr/DateDaysEncoder.h b/DataMgr/DateDaysEncoder.h index 721b635e31..6cd3999fdb 100644 --- a/DataMgr/DateDaysEncoder.h +++ b/DataMgr/DateDaysEncoder.h @@ -17,7 +17,7 @@ #ifndef DATE_DAYS_ENCODER_H #define DATE_DAYS_ENCODER_H -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/DataMgr/Encoder.cpp b/DataMgr/Encoder.cpp index 689de83f7d..117ad5eb0f 100644 --- a/DataMgr/Encoder.cpp +++ b/DataMgr/Encoder.cpp @@ -19,8 +19,8 @@ #include "DateDaysEncoder.h" #include "FixedLengthArrayNoneEncoder.h" #include "FixedLengthEncoder.h" +#include "Logger/Logger.h" #include "NoneEncoder.h" -#include "Shared/Logger.h" #include "StringNoneEncoder.h" Encoder* Encoder::Create(Data_Namespace::AbstractBuffer* buffer, diff --git a/DataMgr/FileMgr/FileBuffer.h b/DataMgr/FileMgr/FileBuffer.h index 9a65f18718..28543e0789 100644 --- a/DataMgr/FileMgr/FileBuffer.h +++ b/DataMgr/FileMgr/FileBuffer.h @@ -28,7 +28,7 @@ #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" using namespace Data_Namespace; diff --git a/DataMgr/FileMgr/FileInfo.h b/DataMgr/FileMgr/FileInfo.h index b62b1fcaf4..924df94d0f 100644 --- a/DataMgr/FileMgr/FileInfo.h +++ b/DataMgr/FileMgr/FileInfo.h @@ -24,8 +24,8 @@ #include #include #include "../../Shared/types.h" +#include "Logger/Logger.h" #include "Page.h" -#include "Shared/Logger.h" namespace File_Namespace { diff --git a/DataMgr/FileMgr/Page.h b/DataMgr/FileMgr/Page.h index 4a4ed70be0..13d23a8f5f 100644 --- a/DataMgr/FileMgr/Page.h +++ b/DataMgr/FileMgr/Page.h @@ -23,7 +23,7 @@ #ifndef DATAMGR_MEMORY_FILE_PAGE_H #define DATAMGR_MEMORY_FILE_PAGE_H -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/DataMgr/FixedLengthArrayNoneEncoder.h b/DataMgr/FixedLengthArrayNoneEncoder.h index 0f254f9868..a438cc652c 100644 --- a/DataMgr/FixedLengthArrayNoneEncoder.h +++ b/DataMgr/FixedLengthArrayNoneEncoder.h @@ -24,7 +24,7 @@ #ifndef FIXED_LENGTH_ARRAY_NONE_ENCODER_H #define FIXED_LENGTH_ARRAY_NONE_ENCODER_H -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/DataMgr/FixedLengthEncoder.h b/DataMgr/FixedLengthEncoder.h index 480f7867ac..ebf9b552e2 100644 --- a/DataMgr/FixedLengthEncoder.h +++ b/DataMgr/FixedLengthEncoder.h @@ -16,7 +16,7 @@ #ifndef FIXED_LENGTH_ENCODER_H #define FIXED_LENGTH_ENCODER_H -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/DataMgr/ForeignStorage/ArrowCsvForeignStorage.cpp b/DataMgr/ForeignStorage/ArrowCsvForeignStorage.cpp index e86a965da3..fba264a50b 100644 --- a/DataMgr/ForeignStorage/ArrowCsvForeignStorage.cpp +++ b/DataMgr/ForeignStorage/ArrowCsvForeignStorage.cpp @@ -29,9 +29,9 @@ #include "Catalog/DataframeTableDescriptor.h" #include "DataMgr/ForeignStorage/ForeignStorageInterface.h" #include "DataMgr/StringNoneEncoder.h" +#include "Logger/Logger.h" #include "QueryEngine/ArrowResultSet.h" #include "Shared/ArrowUtil.h" -#include "Shared/Logger.h" #include "Shared/measure.h" struct Frag { diff --git a/DataMgr/StringNoneEncoder.h b/DataMgr/StringNoneEncoder.h index d4b8087a15..d9269f6e39 100644 --- a/DataMgr/StringNoneEncoder.h +++ b/DataMgr/StringNoneEncoder.h @@ -23,7 +23,7 @@ **/ #ifndef STRING_NONE_ENCODER_H #define STRING_NONE_ENCODER_H -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/Distributed/os/LeafAggregator.h b/Distributed/os/LeafAggregator.h index 59e8294d9d..a647095287 100644 --- a/Distributed/os/LeafAggregator.h +++ b/Distributed/os/LeafAggregator.h @@ -24,7 +24,7 @@ #include "QueryEngine/TargetMetaInfo.h" #include "gen-cpp/OmniSci.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" namespace Catalog_Namespace { class SessionInfo; diff --git a/Embedded/DBEngine.cpp b/Embedded/DBEngine.cpp index a01f21fbb6..4b168e68e2 100644 --- a/Embedded/DBEngine.cpp +++ b/Embedded/DBEngine.cpp @@ -19,10 +19,10 @@ #include #include #include "Catalog/Catalog.h" +#include "Logger/Logger.h" #include "QueryEngine/CompilationOptions.h" #include "QueryEngine/ResultSet.h" #include "QueryRunner/QueryRunner.h" -#include "Shared/Logger.h" #include "Shared/mapdpath.h" #include "Shared/sqltypes.h" diff --git a/Fragmenter/InsertOrderFragmenter.cpp b/Fragmenter/InsertOrderFragmenter.cpp index 2ed48cf8dc..8b67b0ca0c 100644 --- a/Fragmenter/InsertOrderFragmenter.cpp +++ b/Fragmenter/InsertOrderFragmenter.cpp @@ -29,7 +29,7 @@ #include "DataMgr/AbstractBuffer.h" #include "DataMgr/DataMgr.h" #include "LockMgr/LockMgr.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "Shared/checked_alloc.h" #include "Shared/thread_count.h" diff --git a/Fragmenter/UpdelStorage.cpp b/Fragmenter/UpdelStorage.cpp index 88b1068539..52d8749e47 100644 --- a/Fragmenter/UpdelStorage.cpp +++ b/Fragmenter/UpdelStorage.cpp @@ -25,10 +25,10 @@ #include "DataMgr/DataMgr.h" #include "DataMgr/FixedLengthArrayNoneEncoder.h" #include "Fragmenter/InsertOrderFragmenter.h" +#include "Logger/Logger.h" #include "QueryEngine/Execute.h" #include "QueryEngine/TargetValue.h" #include "Shared/DateConverters.h" -#include "Shared/Logger.h" #include "Shared/TypedDataAccessors.h" #include "Shared/thread_count.h" #include "TargetValueConvertersFactories.h" diff --git a/ImportExport/CMakeLists.txt b/ImportExport/CMakeLists.txt index 012a488e4b..c3edb08834 100644 --- a/ImportExport/CMakeLists.txt +++ b/ImportExport/CMakeLists.txt @@ -21,7 +21,7 @@ set(EXPORT_SOURCES add_library(ImportExport ${GDAL_SOURCES} ${IMPORT_SOURCES} ${EXPORT_SOURCES} ${S3Archive}) -target_link_libraries(ImportExport mapd_thrift Shared Catalog DataMgr StringDictionary ${GDAL_LIBRARIES} ${CMAKE_DL_LIBS} +target_link_libraries(ImportExport mapd_thrift Logger Shared Catalog DataMgr StringDictionary ${GDAL_LIBRARIES} ${CMAKE_DL_LIBS} ${LibArchive_LIBRARIES} ${IMPORT_EXPORT_LIBRARIES} ${Arrow_LIBRARIES}) install(DIRECTORY ${CMAKE_SOURCE_DIR}/ThirdParty/gdal-data DESTINATION "ThirdParty") @@ -34,9 +34,9 @@ add_library(RowToColumn RowToColumnLoader.cpp RowToColumnLoader.h DelimitedParse target_link_libraries(RowToColumn ThriftClient) add_executable(StreamImporter StreamImporter.cpp) -target_link_libraries(StreamImporter RowToColumn mapd_thrift Shared ${CMAKE_DL_LIBS} ${Boost_LIBRARIES} ${PROFILER_LIBS}) +target_link_libraries(StreamImporter RowToColumn mapd_thrift Logger Shared ${CMAKE_DL_LIBS} ${Boost_LIBRARIES} ${PROFILER_LIBS}) add_executable(KafkaImporter KafkaImporter.cpp) -target_link_libraries(KafkaImporter RowToColumn mapd_thrift ${RdKafka_LIBRARIES} Shared ${CMAKE_DL_LIBS} ${Boost_LIBRARIES} ${PROFILER_LIBS}) +target_link_libraries(KafkaImporter RowToColumn mapd_thrift ${RdKafka_LIBRARIES} Logger Shared ${CMAKE_DL_LIBS} ${Boost_LIBRARIES} ${PROFILER_LIBS}) install(TARGETS StreamImporter KafkaImporter DESTINATION bin) diff --git a/ImportExport/DelimitedParserUtils.cpp b/ImportExport/DelimitedParserUtils.cpp index 0020ba4b1f..02653e505f 100644 --- a/ImportExport/DelimitedParserUtils.cpp +++ b/ImportExport/DelimitedParserUtils.cpp @@ -24,7 +24,7 @@ #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "StringDictionary/StringDictionary.h" namespace { diff --git a/ImportExport/GDAL.cpp b/ImportExport/GDAL.cpp index a6ad2a5d28..3d974f3b1e 100644 --- a/ImportExport/GDAL.cpp +++ b/ImportExport/GDAL.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include namespace import_export { diff --git a/ImportExport/Importer.cpp b/ImportExport/Importer.cpp index 157aca426c..3fdd4e67ee 100644 --- a/ImportExport/Importer.cpp +++ b/ImportExport/Importer.cpp @@ -55,8 +55,8 @@ #include "ArrowImporter.h" #include "ImportExport/DelimitedParserUtils.h" #include "ImportExport/GDAL.h" +#include "Logger/Logger.h" #include "QueryEngine/TypePunning.h" -#include "Shared/Logger.h" #include "Shared/SqlTypesLayout.h" #include "Shared/geo_compression.h" #include "Shared/geo_types.h" diff --git a/ImportExport/Importer.h b/ImportExport/Importer.h index 5dc8459a9a..b86d52e72d 100644 --- a/ImportExport/Importer.h +++ b/ImportExport/Importer.h @@ -47,7 +47,7 @@ #include "DataMgr/Chunk/Chunk.h" #include "Fragmenter/Fragmenter.h" #include "ImportExport/CopyParams.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "Shared/ThreadController.h" #include "Shared/checked_alloc.h" #include "Shared/fixautotools.h" diff --git a/ImportExport/KafkaImporter.cpp b/ImportExport/KafkaImporter.cpp index baaff614c1..46df05195a 100644 --- a/ImportExport/KafkaImporter.cpp +++ b/ImportExport/KafkaImporter.cpp @@ -30,8 +30,8 @@ #include #include +#include "Logger/Logger.h" #include "RowToColumnLoader.h" -#include "Shared/Logger.h" #include "Shared/ThriftClient.h" #include "Shared/sqltypes.h" diff --git a/ImportExport/RowToColumnLoader.cpp b/ImportExport/RowToColumnLoader.cpp index 76ea1103e5..817ec4ba69 100644 --- a/ImportExport/RowToColumnLoader.cpp +++ b/ImportExport/RowToColumnLoader.cpp @@ -25,7 +25,7 @@ #include "ImportExport/RowToColumnLoader.h" #include "ImportExport/DelimitedParserUtils.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" using namespace ::apache::thrift; diff --git a/ImportExport/RowToColumnLoader.h b/ImportExport/RowToColumnLoader.h index 76c47c06e8..ea7d7f755f 100644 --- a/ImportExport/RowToColumnLoader.h +++ b/ImportExport/RowToColumnLoader.h @@ -26,7 +26,7 @@ * Copyright (c) 2017 MapD Technologies, Inc. All rights reserved. **/ -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/ImportExport/StreamImporter.cpp b/ImportExport/StreamImporter.cpp index 8fa7f54423..e8270b9095 100644 --- a/ImportExport/StreamImporter.cpp +++ b/ImportExport/StreamImporter.cpp @@ -30,8 +30,8 @@ #include #include +#include "Logger/Logger.h" #include "RowToColumnLoader.h" -#include "Shared/Logger.h" #include "Shared/ThriftClient.h" #include "Shared/sqltypes.h" diff --git a/Logger/CMakeLists.txt b/Logger/CMakeLists.txt new file mode 100644 index 0000000000..92fbc3f48a --- /dev/null +++ b/Logger/CMakeLists.txt @@ -0,0 +1,6 @@ +set(logger_source_files + Logger.cpp +) + +add_library(Logger ${logger_source_files}) +target_link_libraries(Logger ${Boost_LIBRARIES}) diff --git a/Shared/Logger.cpp b/Logger/Logger.cpp similarity index 97% rename from Shared/Logger.cpp rename to Logger/Logger.cpp index 770027409a..4d0b7c999b 100644 --- a/Shared/Logger.cpp +++ b/Logger/Logger.cpp @@ -19,7 +19,6 @@ bool g_enable_debug_timer{false}; #ifndef __CUDACC__ #include "Logger.h" -#include "StringTransform.h" #include #include @@ -97,7 +96,11 @@ void LogOptions::set_base_path(std::string const& base_path) { // May be called to update default values based on updated member variables. void LogOptions::set_options() { options_ = std::make_unique("Logging"); - std::string const channels = join(ChannelNames, " "); + std::string const channels = + std::accumulate(ChannelNames.cbegin() + 1, + ChannelNames.cend(), + std::string(ChannelNames.front()), + [](auto a, auto channel) { return a + ' ' + channel; }); // Filter out DEBUG[1-4] severities from --help options std::string severities; for (auto const& name : SeverityNames) { @@ -311,6 +314,20 @@ void shutdown() { boost::log::core::get()->remove_all_sinks(); } +namespace { + +// Remove quotes if they match from beginning and end of string. +// Does not check for escaped quotes within string. +void unquote(std::string& str) { + if (1 < str.size() && (str.front() == '\'' || str.front() == '"') && + str.front() == str.back()) { + str.erase(str.size() - 1, 1); + str.erase(0, 1); + } +} + +} // namespace + // Used by boost::program_options when parsing enum Channel. std::istream& operator>>(std::istream& in, Channels& channels) { std::string line; @@ -591,7 +608,7 @@ class JsonEncoder : boost::static_visitor { end_ = duration_tree.durations().cend(); rapidjson::Value retval(rapidjson::kObjectType); retval.AddMember("type", "duration_tree", alloc_); - retval.AddMember("thread_id", to_string(duration_tree.thread_id_), alloc_); + retval.AddMember("thread_id", std::to_string(duration_tree.thread_id_), alloc_); retval.AddMember("children", childNodes(duration_tree.depth_), alloc_); return retval; } @@ -619,7 +636,7 @@ class JsonEncoder : boost::static_visitor { if (begin_ != end_) { auto const& root_duration = boost::get(*(begin_++)); retval.AddMember("type", "root", alloc_); - retval.AddMember("thread_id", to_string(kv_pair.first), alloc_); + retval.AddMember("thread_id", std::to_string(kv_pair.first), alloc_); retval.AddMember( "total_duration_ms", rapidjson::Value(root_duration.value()), alloc_); retval.AddMember("name", rapidjson::StringRef(root_duration.name_), alloc_); diff --git a/Shared/Logger.h b/Logger/Logger.h similarity index 100% rename from Shared/Logger.h rename to Logger/Logger.h diff --git a/MapDServer.cpp b/MapDServer.cpp index fa9054b537..2dfbb9f370 100644 --- a/MapDServer.cpp +++ b/MapDServer.cpp @@ -35,7 +35,7 @@ #include #include "Archive/S3Archive.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "Shared/SystemParameters.h" #include "Shared/file_delete.h" #include "Shared/mapd_shared_mutex.h" diff --git a/MigrationMgr/MigrationMgr.cpp b/MigrationMgr/MigrationMgr.cpp index e2a34ef1cc..31f5c30931 100644 --- a/MigrationMgr/MigrationMgr.cpp +++ b/MigrationMgr/MigrationMgr.cpp @@ -22,9 +22,9 @@ #include #include +#include "Logger/Logger.h" #include "QueryEngine/Execute.h" #include "QueryEngine/TableOptimizer.h" -#include "Shared/Logger.h" #include "Shared/sqltypes.h" #include "MapDRelease.h" diff --git a/QueryEngine/AggregateUtils.h b/QueryEngine/AggregateUtils.h index 2e68f80f66..b60a39e70d 100644 --- a/QueryEngine/AggregateUtils.h +++ b/QueryEngine/AggregateUtils.h @@ -21,7 +21,7 @@ #include "BufferCompaction.h" #include "TypePunning.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" inline void set_component(int8_t* group_by_buffer, const size_t comp_sz, diff --git a/QueryEngine/CMakeLists.txt b/QueryEngine/CMakeLists.txt index 9593360d3e..fbed8a7190 100644 --- a/QueryEngine/CMakeLists.txt +++ b/QueryEngine/CMakeLists.txt @@ -228,6 +228,7 @@ set(QUERY_ENGINE_LIBS Analyzer StringDictionary Utils + Logger Shared sqlite3 ${Arrow_LIBRARIES} @@ -243,6 +244,7 @@ add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cuda_mapd_rt.fatbin COMMAND nvcc ARGS + -I ${CMAKE_SOURCE_DIR} ${MAPD_HOST_COMPILER_FLAG} -Xcompiler -fPIC -D__STDC_LIMIT_MACROS @@ -326,6 +328,7 @@ add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/HashJoinRuntimeGpu.o COMMAND nvcc ARGS + -I ${CMAKE_SOURCE_DIR} ${MAPD_HOST_COMPILER_FLAG} -Xcompiler -fPIC -D_FORCE_INLINES @@ -347,4 +350,4 @@ add_custom_target(QueryEngineCudaTargets ) add_executable(group_by_hash_test ${group_by_hash_test_files}) -target_link_libraries(group_by_hash_test gtest Shared ${Boost_LIBRARIES} ${PROFILER_LIBS}) +target_link_libraries(group_by_hash_test gtest Logger Shared ${Boost_LIBRARIES} ${PROFILER_LIBS}) diff --git a/QueryEngine/CalciteAdapter.cpp b/QueryEngine/CalciteAdapter.cpp index 01976e810b..0af1a447d9 100644 --- a/QueryEngine/CalciteAdapter.cpp +++ b/QueryEngine/CalciteAdapter.cpp @@ -20,6 +20,7 @@ #include #include +#include "Logger/Logger.h" #include "Shared/StringTransform.h" namespace { diff --git a/QueryEngine/CalciteDeserializerUtils.cpp b/QueryEngine/CalciteDeserializerUtils.cpp index 68265feabb..493b518e09 100644 --- a/QueryEngine/CalciteDeserializerUtils.cpp +++ b/QueryEngine/CalciteDeserializerUtils.cpp @@ -17,7 +17,7 @@ #include "CalciteDeserializerUtils.h" #include "../Analyzer/Analyzer.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include diff --git a/QueryEngine/CalciteDeserializerUtils.h b/QueryEngine/CalciteDeserializerUtils.h index 7790e08b00..d70fbb4663 100644 --- a/QueryEngine/CalciteDeserializerUtils.h +++ b/QueryEngine/CalciteDeserializerUtils.h @@ -22,7 +22,7 @@ #include "../Shared/sqldefs.h" #include "../Shared/sqltypes.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" inline SQLOps to_sql_op(const std::string& op_str) { if (op_str == std::string(">")) { diff --git a/QueryEngine/CardinalityEstimator.h b/QueryEngine/CardinalityEstimator.h index 0e1f11f0cd..589f2fe9a9 100644 --- a/QueryEngine/CardinalityEstimator.h +++ b/QueryEngine/CardinalityEstimator.h @@ -28,7 +28,7 @@ #include "RelAlgExecutionUnit.h" #include "../Analyzer/Analyzer.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" class CardinalityEstimationRequired : public std::runtime_error { public: diff --git a/QueryEngine/Codec.cpp b/QueryEngine/Codec.cpp index 6d07a0350a..1fbeb8e2c7 100644 --- a/QueryEngine/Codec.cpp +++ b/QueryEngine/Codec.cpp @@ -16,7 +16,7 @@ #include "Codec.h" #include "LLVMGlobalContext.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/QueryEngine/DateTimePlusRewrite.cpp b/QueryEngine/DateTimePlusRewrite.cpp index 06ce6c5e31..ef5629fd73 100644 --- a/QueryEngine/DateTimePlusRewrite.cpp +++ b/QueryEngine/DateTimePlusRewrite.cpp @@ -19,7 +19,7 @@ #include "../Analyzer/Analyzer.h" #include "../Parser/ParserNode.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "DateTimeTranslator.h" diff --git a/QueryEngine/Descriptors/ColSlotContext.h b/QueryEngine/Descriptors/ColSlotContext.h index ca0bc3fd08..ea1181f65b 100644 --- a/QueryEngine/Descriptors/ColSlotContext.h +++ b/QueryEngine/Descriptors/ColSlotContext.h @@ -24,7 +24,7 @@ #pragma once -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/QueryEngine/Descriptors/CountDistinctDescriptor.h b/QueryEngine/Descriptors/CountDistinctDescriptor.h index f8053944f8..4baeec23bd 100644 --- a/QueryEngine/Descriptors/CountDistinctDescriptor.h +++ b/QueryEngine/Descriptors/CountDistinctDescriptor.h @@ -28,7 +28,7 @@ #include "../BufferCompaction.h" #include "../CompilationOptions.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" inline size_t bitmap_bits_to_bytes(const size_t bitmap_sz) { size_t bitmap_byte_sz = bitmap_sz / 8; diff --git a/QueryEngine/Descriptors/InputDescriptors.h b/QueryEngine/Descriptors/InputDescriptors.h index 5906ee8a5a..da7c61f625 100644 --- a/QueryEngine/Descriptors/InputDescriptors.h +++ b/QueryEngine/Descriptors/InputDescriptors.h @@ -18,7 +18,7 @@ #define QUERYENGINE_INPUTDESCRIPTORS_H #include "../Catalog/TableDescriptor.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include diff --git a/QueryEngine/Descriptors/QueryFragmentDescriptor.h b/QueryEngine/Descriptors/QueryFragmentDescriptor.h index 36e92c0bbe..9549159e8a 100644 --- a/QueryEngine/Descriptors/QueryFragmentDescriptor.h +++ b/QueryEngine/Descriptors/QueryFragmentDescriptor.h @@ -33,8 +33,8 @@ #include #include "DataMgr/ChunkMetadata.h" +#include "Logger/Logger.h" #include "QueryEngine/CompilationOptions.h" -#include "Shared/Logger.h" namespace Fragmenter_Namespace { class FragmentInfo; diff --git a/QueryEngine/Descriptors/QueryMemoryDescriptor.h b/QueryEngine/Descriptors/QueryMemoryDescriptor.h index e12fa2b531..2c23b0f327 100644 --- a/QueryEngine/Descriptors/QueryMemoryDescriptor.h +++ b/QueryEngine/Descriptors/QueryMemoryDescriptor.h @@ -31,7 +31,7 @@ #include "Types.h" #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/QueryEngine/Descriptors/RowSetMemoryOwner.h b/QueryEngine/Descriptors/RowSetMemoryOwner.h index e27d952899..5eec752667 100644 --- a/QueryEngine/Descriptors/RowSetMemoryOwner.h +++ b/QueryEngine/Descriptors/RowSetMemoryOwner.h @@ -27,7 +27,7 @@ #include "DataMgr/AbstractBuffer.h" #include "DataMgr/Allocators/ArenaAllocator.h" #include "DataMgr/DataMgr.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "StringDictionary/StringDictionaryProxy.h" class ResultSet; diff --git a/QueryEngine/DynamicWatchdog.cpp b/QueryEngine/DynamicWatchdog.cpp index 72c42835b9..a7c2016b4b 100644 --- a/QueryEngine/DynamicWatchdog.cpp +++ b/QueryEngine/DynamicWatchdog.cpp @@ -19,7 +19,7 @@ #include #include "DynamicWatchdog.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" static __inline__ uint64_t read_cycle_counter(void) { #if (defined(__x86_64__) || defined(__x86_64)) diff --git a/QueryEngine/Execute.h b/QueryEngine/Execute.h index bcee4ed8b1..b19562d897 100644 --- a/QueryEngine/Execute.h +++ b/QueryEngine/Execute.h @@ -40,7 +40,7 @@ #include "QueryEngine/Descriptors/QueryCompilationDescriptor.h" -#include "../Shared/Logger.h" +#include "../Logger/Logger.h" #include "../Shared/SystemParameters.h" #include "../Shared/mapd_shared_mutex.h" #include "../Shared/measure.h" diff --git a/QueryEngine/ExecutionKernel.h b/QueryEngine/ExecutionKernel.h index 226006d859..c2d3c7bbd4 100644 --- a/QueryEngine/ExecutionKernel.h +++ b/QueryEngine/ExecutionKernel.h @@ -16,9 +16,9 @@ #pragma once +#include "Logger/Logger.h" #include "QueryEngine/ColumnFetcher.h" #include "QueryEngine/Descriptors/QueryCompilationDescriptor.h" -#include "Shared/Logger.h" class SharedKernelContext { public: diff --git a/QueryEngine/ExpressionRewrite.cpp b/QueryEngine/ExpressionRewrite.cpp index ad2c5aa131..b953f6dfed 100644 --- a/QueryEngine/ExpressionRewrite.cpp +++ b/QueryEngine/ExpressionRewrite.cpp @@ -20,9 +20,9 @@ #include "../Shared/sqldefs.h" #include "DeepCopyVisitor.h" #include "Execute.h" +#include "Logger/Logger.h" #include "RelAlgTranslator.h" #include "ScalarExprVisitor.h" -#include "Shared/Logger.h" #include "WindowExpressionRewrite.h" #include diff --git a/QueryEngine/ExternalExecutor.cpp b/QueryEngine/ExternalExecutor.cpp index ae71ef5136..c980b74471 100644 --- a/QueryEngine/ExternalExecutor.cpp +++ b/QueryEngine/ExternalExecutor.cpp @@ -16,9 +16,9 @@ #include "QueryEngine/ExternalExecutor.h" +#include "Logger/Logger.h" #include "QueryEngine/Execute.h" #include "QueryEngine/OutputBufferInitialization.h" -#include "Shared/Logger.h" #include "SqliteConnector/SqliteConnector.h" namespace { diff --git a/QueryEngine/GpuMemUtils.cpp b/QueryEngine/GpuMemUtils.cpp index 325e2512b2..7654bb1b39 100644 --- a/QueryEngine/GpuMemUtils.cpp +++ b/QueryEngine/GpuMemUtils.cpp @@ -17,7 +17,7 @@ #include "GpuMemUtils.h" #include "DataMgr/Allocators/CudaAllocator.h" #include "GpuInitGroups.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "StreamingTopN.h" #include "../CudaMgr/CudaMgr.h" diff --git a/QueryEngine/GpuSharedMemoryContext.h b/QueryEngine/GpuSharedMemoryContext.h index 799fc0e9fc..5211c85ce1 100644 --- a/QueryEngine/GpuSharedMemoryContext.h +++ b/QueryEngine/GpuSharedMemoryContext.h @@ -15,7 +15,7 @@ */ #pragma once -#include "Shared/Logger.h" +#include "Logger/Logger.h" class GpuSharedMemoryContext { public: diff --git a/QueryEngine/GpuSharedMemoryUtils.h b/QueryEngine/GpuSharedMemoryUtils.h index cba488b592..dabe05613b 100644 --- a/QueryEngine/GpuSharedMemoryUtils.h +++ b/QueryEngine/GpuSharedMemoryUtils.h @@ -29,8 +29,8 @@ #include "Descriptors/QueryMemoryDescriptor.h" #include "IRCodegenUtils.h" +#include "Logger/Logger.h" #include "ResultSet.h" -#include "Shared/Logger.h" #include "Shared/TargetInfo.h" /** diff --git a/QueryEngine/GroupByAndAggregate.h b/QueryEngine/GroupByAndAggregate.h index be54fc15ce..0f180ef96f 100644 --- a/QueryEngine/GroupByAndAggregate.h +++ b/QueryEngine/GroupByAndAggregate.h @@ -28,7 +28,7 @@ #include "RuntimeFunctions.h" #include "../Shared/sqltypes.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/QueryEngine/IRCodegenUtils.h b/QueryEngine/IRCodegenUtils.h index d28f8d730e..5c62f6c3e8 100644 --- a/QueryEngine/IRCodegenUtils.h +++ b/QueryEngine/IRCodegenUtils.h @@ -22,7 +22,7 @@ #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" #if LLVM_VERSION_MAJOR >= 10 #define LLVM_ALIGN(alignment) llvm::Align(alignment) diff --git a/QueryEngine/InPlaceSort.cpp b/QueryEngine/InPlaceSort.cpp index a8bbf23503..846f53c84d 100644 --- a/QueryEngine/InPlaceSort.cpp +++ b/QueryEngine/InPlaceSort.cpp @@ -20,7 +20,7 @@ #include #include "DataMgr/Allocators/ThrustAllocator.h" #include "Descriptors/QueryMemoryDescriptor.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include diff --git a/QueryEngine/InValuesBitmap.cpp b/QueryEngine/InValuesBitmap.cpp index 23a30a715b..d89a80df8c 100644 --- a/QueryEngine/InValuesBitmap.cpp +++ b/QueryEngine/InValuesBitmap.cpp @@ -23,8 +23,8 @@ #include "../Parser/ParserNode.h" #include "../Shared/checked_alloc.h" #include "GroupByAndAggregate.h" +#include "Logger/Logger.h" #include "RuntimeFunctions.h" -#include "Shared/Logger.h" #include #include diff --git a/QueryEngine/JoinHashTable/HashJoinKeyHandlers.h b/QueryEngine/JoinHashTable/HashJoinKeyHandlers.h index bd159d36a3..e9247ad7ba 100644 --- a/QueryEngine/JoinHashTable/HashJoinKeyHandlers.h +++ b/QueryEngine/JoinHashTable/HashJoinKeyHandlers.h @@ -24,8 +24,8 @@ #ifdef __CUDACC__ #include "../DecodersImpl.h" #else +#include "Logger/Logger.h" #include "QueryEngine/RuntimeFunctions.h" -#include "Shared/Logger.h" #include "StringDictionary/StringDictionary.h" #include "StringDictionary/StringDictionaryProxy.h" #endif diff --git a/QueryEngine/JoinHashTable/HashJoinRuntime.cpp b/QueryEngine/JoinHashTable/HashJoinRuntime.cpp index 3bd4460d85..3664ff8f7c 100644 --- a/QueryEngine/JoinHashTable/HashJoinRuntime.cpp +++ b/QueryEngine/JoinHashTable/HashJoinRuntime.cpp @@ -27,7 +27,7 @@ #include "../GpuRtConstants.h" #include "../JoinHashTable/JoinHashImpl.h" #else -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "QueryEngine/RuntimeFunctions.h" #include "Shared/likely.h" diff --git a/QueryEngine/JoinHashTable/JoinHashTable.cpp b/QueryEngine/JoinHashTable/JoinHashTable.cpp index 8f0a8f84cb..e5343d06ba 100644 --- a/QueryEngine/JoinHashTable/JoinHashTable.cpp +++ b/QueryEngine/JoinHashTable/JoinHashTable.cpp @@ -20,6 +20,7 @@ #include #include +#include "Logger/Logger.h" #include "QueryEngine/CodeGenerator.h" #include "QueryEngine/ColumnFetcher.h" #include "QueryEngine/Execute.h" @@ -27,7 +28,6 @@ #include "QueryEngine/JoinHashTable/HashJoinRuntime.h" #include "QueryEngine/RangeTableIndexVisitor.h" #include "QueryEngine/RuntimeFunctions.h" -#include "Shared/Logger.h" namespace { diff --git a/QueryEngine/JsonAccessors.h b/QueryEngine/JsonAccessors.h index 61a6d524f8..51d61e149b 100644 --- a/QueryEngine/JsonAccessors.h +++ b/QueryEngine/JsonAccessors.h @@ -26,7 +26,7 @@ #define QUERYENGINE_JSONACCESSORS_H #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" inline const rapidjson::Value& field(const rapidjson::Value& obj, const char field[]) noexcept { diff --git a/QueryEngine/LoopControlFlow/JoinLoop.cpp b/QueryEngine/LoopControlFlow/JoinLoop.cpp index 896ba6a3e7..49e518a5d5 100644 --- a/QueryEngine/LoopControlFlow/JoinLoop.cpp +++ b/QueryEngine/LoopControlFlow/JoinLoop.cpp @@ -16,7 +16,7 @@ #include "JoinLoop.h" #include "../CgenState.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include diff --git a/QueryEngine/LoopControlFlow/JoinLoop.h b/QueryEngine/LoopControlFlow/JoinLoop.h index b3f5bb7120..c3bf8f70d3 100644 --- a/QueryEngine/LoopControlFlow/JoinLoop.h +++ b/QueryEngine/LoopControlFlow/JoinLoop.h @@ -19,7 +19,7 @@ #include #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "../../Shared/sqldefs.h" #include "../CgenState.h" diff --git a/QueryEngine/LoopControlFlow/JoinLoopTest.cpp b/QueryEngine/LoopControlFlow/JoinLoopTest.cpp index 8f9ad2d7ff..3e1332a79e 100644 --- a/QueryEngine/LoopControlFlow/JoinLoopTest.cpp +++ b/QueryEngine/LoopControlFlow/JoinLoopTest.cpp @@ -18,7 +18,7 @@ // with the one generated by the `generate_loop_ref.py` script. #include "JoinLoop.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/QueryEngine/NvidiaKernel.cpp b/QueryEngine/NvidiaKernel.cpp index 0c1c4b77af..ae626e87dc 100644 --- a/QueryEngine/NvidiaKernel.cpp +++ b/QueryEngine/NvidiaKernel.cpp @@ -17,7 +17,7 @@ #include "NvidiaKernel.h" #include "../Shared/mapdpath.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include diff --git a/QueryEngine/QueryMemoryInitializer.cpp b/QueryEngine/QueryMemoryInitializer.cpp index 42080c40c2..24fc6c7f7a 100644 --- a/QueryEngine/QueryMemoryInitializer.cpp +++ b/QueryEngine/QueryMemoryInitializer.cpp @@ -19,9 +19,9 @@ #include "Execute.h" #include "GpuInitGroups.h" #include "GpuMemUtils.h" +#include "Logger/Logger.h" #include "OutputBufferInitialization.h" #include "ResultSet.h" -#include "Shared/Logger.h" #include "StreamingTopN.h" #include diff --git a/QueryEngine/QueryRewrite.cpp b/QueryEngine/QueryRewrite.cpp index 4703919b93..52612e6b47 100644 --- a/QueryEngine/QueryRewrite.cpp +++ b/QueryEngine/QueryRewrite.cpp @@ -22,8 +22,8 @@ #include "ExpressionRange.h" #include "ExpressionRewrite.h" +#include "Logger/Logger.h" #include "Parser/ParserNode.h" -#include "Shared/Logger.h" RelAlgExecutionUnit QueryRewriter::rewrite( const RelAlgExecutionUnit& ra_exe_unit_in) const { diff --git a/QueryEngine/QueryTemplateGenerator.cpp b/QueryEngine/QueryTemplateGenerator.cpp index 4bd5196c6d..009be9c2ea 100644 --- a/QueryEngine/QueryTemplateGenerator.cpp +++ b/QueryEngine/QueryTemplateGenerator.cpp @@ -16,7 +16,7 @@ #include "QueryTemplateGenerator.h" #include "IRCodegenUtils.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/QueryEngine/RelAlgOptimizer.cpp b/QueryEngine/RelAlgOptimizer.cpp index 7e6a56ac51..47ce9bfcf8 100644 --- a/QueryEngine/RelAlgOptimizer.cpp +++ b/QueryEngine/RelAlgOptimizer.cpp @@ -15,8 +15,8 @@ */ #include "RelAlgOptimizer.h" +#include "Logger/Logger.h" #include "RexVisitor.h" -#include "Shared/Logger.h" #include "Visitors/RexSubQueryIdCollector.h" #include diff --git a/QueryEngine/RelLeftDeepInnerJoin.cpp b/QueryEngine/RelLeftDeepInnerJoin.cpp index f47f50cd85..81d8a9a7c8 100644 --- a/QueryEngine/RelLeftDeepInnerJoin.cpp +++ b/QueryEngine/RelLeftDeepInnerJoin.cpp @@ -15,9 +15,9 @@ */ #include "RelLeftDeepInnerJoin.h" +#include "Logger/Logger.h" #include "RelAlgDagBuilder.h" #include "RexVisitor.h" -#include "Shared/Logger.h" #include diff --git a/QueryEngine/Rendering/os/RenderAllocator.cpp b/QueryEngine/Rendering/os/RenderAllocator.cpp index afb59c00df..5de4d6f8f2 100644 --- a/QueryEngine/Rendering/os/RenderAllocator.cpp +++ b/QueryEngine/Rendering/os/RenderAllocator.cpp @@ -16,7 +16,7 @@ #include "../RenderAllocator.h" #include "../../GpuInitGroups.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" RenderAllocator::RenderAllocator(int8_t* preallocated_ptr, const size_t preallocated_size, diff --git a/QueryEngine/ResultSetReductionOps.h b/QueryEngine/ResultSetReductionOps.h index 72acd0bda8..749f063709 100644 --- a/QueryEngine/ResultSetReductionOps.h +++ b/QueryEngine/ResultSetReductionOps.h @@ -16,7 +16,7 @@ #pragma once -#include +#include #include #include diff --git a/QueryEngine/SpeculativeTopN.cpp b/QueryEngine/SpeculativeTopN.cpp index 7f01f50173..16921595e4 100644 --- a/QueryEngine/SpeculativeTopN.cpp +++ b/QueryEngine/SpeculativeTopN.cpp @@ -16,9 +16,9 @@ #include "SpeculativeTopN.h" +#include "Logger/Logger.h" #include "RelAlgExecutor.h" #include "ResultSet.h" -#include "Shared/Logger.h" SpeculativeTopNMap::SpeculativeTopNMap() : unknown_(0) {} diff --git a/QueryEngine/StringDictionaryGenerations.cpp b/QueryEngine/StringDictionaryGenerations.cpp index bffbfe0166..7605f08885 100644 --- a/QueryEngine/StringDictionaryGenerations.cpp +++ b/QueryEngine/StringDictionaryGenerations.cpp @@ -16,7 +16,7 @@ #include "StringDictionaryGenerations.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" void StringDictionaryGenerations::setGeneration(const uint32_t id, const size_t generation) { diff --git a/QueryEngine/TableFunctions/TableFunctionExecutionContext.cpp b/QueryEngine/TableFunctions/TableFunctionExecutionContext.cpp index efe7441473..7511f58757 100644 --- a/QueryEngine/TableFunctions/TableFunctionExecutionContext.cpp +++ b/QueryEngine/TableFunctions/TableFunctionExecutionContext.cpp @@ -17,10 +17,10 @@ #include "QueryEngine/TableFunctions/TableFunctionExecutionContext.h" #include "Analyzer/Analyzer.h" +#include "Logger/Logger.h" #include "QueryEngine/ColumnFetcher.h" #include "QueryEngine/GpuMemUtils.h" #include "QueryEngine/TableFunctions/TableFunctionCompilationContext.h" -#include "Shared/Logger.h" namespace { diff --git a/QueryEngine/TableGenerations.cpp b/QueryEngine/TableGenerations.cpp index 79dbcb60ce..cdc3fa5861 100644 --- a/QueryEngine/TableGenerations.cpp +++ b/QueryEngine/TableGenerations.cpp @@ -15,7 +15,7 @@ */ #include "TableGenerations.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" void TableGenerations::setGeneration(const uint32_t id, const TableGeneration& generation) { diff --git a/QueryEngine/TableOptimizer.cpp b/QueryEngine/TableOptimizer.cpp index c72ff5bd06..14aabb2e46 100644 --- a/QueryEngine/TableOptimizer.cpp +++ b/QueryEngine/TableOptimizer.cpp @@ -17,8 +17,8 @@ #include "TableOptimizer.h" #include "Analyzer/Analyzer.h" +#include "Logger/Logger.h" #include "QueryEngine/Execute.h" -#include "Shared/Logger.h" #include "Shared/scope.h" TableOptimizer::TableOptimizer(const TableDescriptor* td, diff --git a/QueryEngine/TargetExprBuilder.cpp b/QueryEngine/TargetExprBuilder.cpp index 6c9181dafe..15af6b0d95 100644 --- a/QueryEngine/TargetExprBuilder.cpp +++ b/QueryEngine/TargetExprBuilder.cpp @@ -25,9 +25,9 @@ #include "CodeGenerator.h" #include "Execute.h" #include "GroupByAndAggregate.h" +#include "Logger/Logger.h" #include "MaxwellCodegenPatch.h" #include "OutputBufferInitialization.h" -#include "Shared/Logger.h" #define LL_CONTEXT executor->cgen_state_->context_ #define LL_BUILDER executor->cgen_state_->ir_builder_ diff --git a/QueryEngine/TargetValue.h b/QueryEngine/TargetValue.h index c904ed1d21..e890bfcb5b 100644 --- a/QueryEngine/TargetValue.h +++ b/QueryEngine/TargetValue.h @@ -27,7 +27,7 @@ #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include diff --git a/QueryEngine/ThriftSerializers.h b/QueryEngine/ThriftSerializers.h index e3e9ce0afc..da8eaa7b04 100644 --- a/QueryEngine/ThriftSerializers.h +++ b/QueryEngine/ThriftSerializers.h @@ -30,7 +30,7 @@ #include "Descriptors/Types.h" #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" namespace ThriftSerializers { @@ -119,7 +119,11 @@ inline TTypeInfo type_info_to_thrift(const SQLTypeInfo& ti) { thrift_ti.encoding = encoding_to_thrift(ti); thrift_ti.nullable = !ti.get_notnull(); thrift_ti.is_array = ti.is_array(); - thrift_ti.precision = ti.get_precision(); + // TODO: Properly serialize geospatial subtype. For now, the value in precision is the + // same as the value in scale; overload the precision field with the subtype of the + // geospatial type (currently kGEOMETRY or kGEOGRAPHY) + thrift_ti.precision = + IS_GEO(ti.get_type()) ? static_cast(ti.get_subtype()) : ti.get_precision(); thrift_ti.scale = ti.get_scale(); thrift_ti.comp_param = ti.get_comp_param(); thrift_ti.size = ti.get_size(); diff --git a/QueryEngine/UDFCompiler.cpp b/QueryEngine/UDFCompiler.cpp index 093ff187d1..5c022fb5b7 100644 --- a/QueryEngine/UDFCompiler.cpp +++ b/QueryEngine/UDFCompiler.cpp @@ -34,7 +34,7 @@ #include #include "Execute.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" using namespace clang; using namespace clang::tooling; diff --git a/QueryEngine/Visitors/RelRexDagVisitor.cpp b/QueryEngine/Visitors/RelRexDagVisitor.cpp index 606041bc23..bc57414e7b 100644 --- a/QueryEngine/Visitors/RelRexDagVisitor.cpp +++ b/QueryEngine/Visitors/RelRexDagVisitor.cpp @@ -23,7 +23,7 @@ */ #include "RelRexDagVisitor.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/QueryEngine/invoke_example/sample.cpp b/QueryEngine/invoke_example/sample.cpp index b8cb0a0b6b..eeb6c2a71a 100644 --- a/QueryEngine/invoke_example/sample.cpp +++ b/QueryEngine/invoke_example/sample.cpp @@ -20,7 +20,7 @@ #include #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "cuda.h" template diff --git a/QueryRunner/QueryRunner.cpp b/QueryRunner/QueryRunner.cpp index cf615a4e75..2559b616b7 100644 --- a/QueryRunner/QueryRunner.cpp +++ b/QueryRunner/QueryRunner.cpp @@ -20,6 +20,7 @@ #include "Catalog/Catalog.h" #include "DistributedLoader.h" #include "ImportExport/CopyParams.h" +#include "Logger/Logger.h" #include "Parser/ParserWrapper.h" #include "Parser/parser.h" #include "QueryEngine/CalciteAdapter.h" @@ -27,7 +28,6 @@ #include "QueryEngine/QueryDispatchQueue.h" #include "QueryEngine/RelAlgExecutor.h" #include "QueryEngine/TableFunctions/TableFunctionsFactory.h" -#include "Shared/Logger.h" #include "Shared/StringTransform.h" #include "Shared/SystemParameters.h" #include "Shared/geosupport.h" diff --git a/SQLFrontend/CMakeLists.txt b/SQLFrontend/CMakeLists.txt index f2f5ff2267..08aca0ab83 100644 --- a/SQLFrontend/CMakeLists.txt +++ b/SQLFrontend/CMakeLists.txt @@ -4,7 +4,7 @@ include_directories(${CMAKE_SOURCE_DIR}/ThirdParty/linenoise) add_executable(omnisql omnisql.cpp) -target_link_libraries(omnisql mapd_thrift Shared ThriftClient linenoise ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${PROFILER_LIBS} ${Thrift_LIBRARIES}) +target_link_libraries(omnisql mapd_thrift Logger Shared ThriftClient linenoise ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${PROFILER_LIBS} ${Thrift_LIBRARIES}) if(ENABLE_KRB5) target_link_libraries(omnisql krb5_gss) endif() diff --git a/SQLFrontend/omnisql.cpp b/SQLFrontend/omnisql.cpp index e399056235..3f578ad114 100644 --- a/SQLFrontend/omnisql.cpp +++ b/SQLFrontend/omnisql.cpp @@ -47,9 +47,9 @@ #include #include #include "../Fragmenter/InsertOrderFragmenter.h" +#include "Logger/Logger.h" #include "MapDRelease.h" #include "MapDServer.h" -#include "Shared/Logger.h" #include "Shared/StringTransform.h" #include "Shared/ThriftClient.h" #include "Shared/ThriftTypesConvert.h" diff --git a/Shared/CMakeLists.txt b/Shared/CMakeLists.txt index ace21e24b3..1ee5887374 100644 --- a/Shared/CMakeLists.txt +++ b/Shared/CMakeLists.txt @@ -9,10 +9,10 @@ set(shared_source_files File.cpp StackTrace.cpp base64.cpp - Logger.cpp misc.cpp thread_count.cpp ) +include_directories(${CMAKE_SOURCE_DIR}) if("${MAPD_EDITION_LOWER}" STREQUAL "ee") list(APPEND shared_source_files ee/Encryption.cpp) endif() @@ -20,7 +20,7 @@ endif() file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/funcannotations.h DESTINATION ${CMAKE_BINARY_DIR}/Shared/) add_library(Shared ${shared_source_files}) -target_link_libraries(Shared ${BLOSC_LIBRARIES} ${Boost_LIBRARIES} ${GDAL_LIBRARIES}) +target_link_libraries(Shared Logger ${BLOSC_LIBRARIES} ${Boost_LIBRARIES} ${GDAL_LIBRARIES}) if("${MAPD_EDITION_LOWER}" STREQUAL "ee") target_link_libraries(Shared ${OPENSSL_LIBRARIES}) endif() diff --git a/Shared/Compressor.cpp b/Shared/Compressor.cpp index ab6c8e64c4..dc559fd1ae 100644 --- a/Shared/Compressor.cpp +++ b/Shared/Compressor.cpp @@ -26,7 +26,7 @@ #include #include #include -#include "Logger.h" +#include "Logger/Logger.h" // we only compress data if the payload size is greater than 512 MB size_t g_compression_limit_bytes{512 * 1024 * 1024}; diff --git a/Shared/Datum.cpp b/Shared/Datum.cpp index a5f6c646da..6c6ec83c4a 100644 --- a/Shared/Datum.cpp +++ b/Shared/Datum.cpp @@ -29,7 +29,7 @@ #include #include "DateConverters.h" -#include "Logger.h" +#include "Logger/Logger.h" #include "QueryEngine/DateTimeUtils.h" #include "StringTransform.h" #include "TimeGM.h" diff --git a/Shared/File.cpp b/Shared/File.cpp index 7c31274cb1..c902a428ae 100644 --- a/Shared/File.cpp +++ b/Shared/File.cpp @@ -27,7 +27,7 @@ #include #include #include -#include "Logger.h" +#include "Logger/Logger.h" namespace File_Namespace { diff --git a/Shared/InlineNullValues.h b/Shared/InlineNullValues.h index a5be84cc34..c2493a7502 100644 --- a/Shared/InlineNullValues.h +++ b/Shared/InlineNullValues.h @@ -17,7 +17,7 @@ #ifndef INLINENULLVALUES_H #define INLINENULLVALUES_H -#include "Logger.h" +#include "Logger/Logger.h" template T inline_fp_null_value(); diff --git a/Shared/SqlTypesLayout.h b/Shared/SqlTypesLayout.h index 7e4eea757e..4234afedaf 100644 --- a/Shared/SqlTypesLayout.h +++ b/Shared/SqlTypesLayout.h @@ -24,7 +24,7 @@ #include "../Shared/TargetInfo.h" -#include "Logger.h" +#include "Logger/Logger.h" #include diff --git a/Shared/StringTransform.cpp b/Shared/StringTransform.cpp index 2d1d9385bd..d12394a0e3 100644 --- a/Shared/StringTransform.cpp +++ b/Shared/StringTransform.cpp @@ -15,6 +15,7 @@ */ #include "StringTransform.h" +#include "Logger/Logger.h" #include #include @@ -224,16 +225,6 @@ bool remove_unquoted_newlines_linefeeds_and_tabs_from_sql_string( return (inside_quote == 0); } -bool unquote(std::string& str) { - if (1 < str.size() && (str.front() == '\'' || str.front() == '"') && - str.front() == str.back()) { - str.erase(str.size() - 1, 1); - str.erase(0, 1); - return true; - } - return false; -} - #ifndef __CUDACC__ std::string get_quoted_string(const std::string& filename, char quote, char escape) { std::stringstream ss; diff --git a/Shared/StringTransform.h b/Shared/StringTransform.h index daad10952b..60126f99b1 100644 --- a/Shared/StringTransform.h +++ b/Shared/StringTransform.h @@ -17,8 +17,6 @@ #ifndef SHARED_STRINGTRANSFORM_H #define SHARED_STRINGTRANSFORM_H -#include "Logger.h" - #ifndef __CUDACC__ #include #include @@ -121,11 +119,6 @@ std::string strip(std::string_view str); bool remove_unquoted_newlines_linefeeds_and_tabs_from_sql_string( std::string& str) noexcept; -// Remove quotes if they match from beginning and end of string. -// Return true if string was changed, false if not. -// Does not check for escaped quotes within string. -bool unquote(std::string&); - #ifndef __CUDACC__ //! Quote a string while escaping any existing quotes in the string. std::string get_quoted_string(const std::string& filename, diff --git a/Shared/ThriftTypesConvert.h b/Shared/ThriftTypesConvert.h index 61146ae362..a8cf874868 100644 --- a/Shared/ThriftTypesConvert.h +++ b/Shared/ThriftTypesConvert.h @@ -19,7 +19,7 @@ #include "gen-cpp/omnisci_types.h" -#include "Logger.h" +#include "Logger/Logger.h" #include diff --git a/Shared/TypedDataAccessors.h b/Shared/TypedDataAccessors.h index 5c3b693388..381171cadf 100644 --- a/Shared/TypedDataAccessors.h +++ b/Shared/TypedDataAccessors.h @@ -18,9 +18,9 @@ #include #include +#include "Logger/Logger.h" #include "Shared/DateConverters.h" #include "Shared/InlineNullValues.h" -#include "Shared/Logger.h" #include "Shared/sqltypes.h" namespace { diff --git a/Shared/checked_alloc.h b/Shared/checked_alloc.h index 26910cdb75..c293f9be04 100644 --- a/Shared/checked_alloc.h +++ b/Shared/checked_alloc.h @@ -24,7 +24,7 @@ #include #include #include -#include "../Shared/Logger.h" +#include "../Logger/Logger.h" #include "../Shared/types.h" class OutOfHostMemory : public std::bad_alloc { diff --git a/Shared/geo_types.cpp b/Shared/geo_types.cpp index ac039a392f..7d9e487c37 100644 --- a/Shared/geo_types.cpp +++ b/Shared/geo_types.cpp @@ -15,7 +15,7 @@ */ #include "geo_types.h" -#include "Logger.h" +#include "Logger/Logger.h" #include "sqltypes.h" #include diff --git a/Shared/mapdpath.h b/Shared/mapdpath.h index 1f851057d9..5cad780706 100644 --- a/Shared/mapdpath.h +++ b/Shared/mapdpath.h @@ -18,7 +18,7 @@ #define _MAPDPATH_H #include -#include "Logger.h" +#include "Logger/Logger.h" #ifdef __APPLE__ #include diff --git a/Shared/measure.h b/Shared/measure.h index b19fbce53d..531a641d39 100644 --- a/Shared/measure.h +++ b/Shared/measure.h @@ -20,7 +20,7 @@ #include #include #include -#include "Logger.h" +#include "Logger/Logger.h" extern bool g_enable_debug_timer; diff --git a/Shared/sql_window_function_to_string.h b/Shared/sql_window_function_to_string.h index 01457eb20b..d774e2a098 100644 --- a/Shared/sql_window_function_to_string.h +++ b/Shared/sql_window_function_to_string.h @@ -19,7 +19,7 @@ #include "sqldefs.h" #include -#include "Logger.h" +#include "Logger/Logger.h" inline std::string sql_window_function_to_str(const SqlWindowFunctionKind kind) { switch (kind) { diff --git a/Shared/sqltypes.h b/Shared/sqltypes.h index e90bb57ab4..51d50f2083 100644 --- a/Shared/sqltypes.h +++ b/Shared/sqltypes.h @@ -22,6 +22,7 @@ #pragma once +#include "Logger/Logger.h" #include "StringTransform.h" #include "funcannotations.h" diff --git a/SqliteConnector/SqliteConnector.cpp b/SqliteConnector/SqliteConnector.cpp index 5ee9f766aa..889989d50c 100644 --- a/SqliteConnector/SqliteConnector.cpp +++ b/SqliteConnector/SqliteConnector.cpp @@ -24,7 +24,7 @@ #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" using std::cout; using std::endl; diff --git a/StringDictionary/StringDictionary.cpp b/StringDictionary/StringDictionary.cpp index 10eac9ed10..9d6fe6ca39 100644 --- a/StringDictionary/StringDictionary.cpp +++ b/StringDictionary/StringDictionary.cpp @@ -19,7 +19,7 @@ #include "../Utils/Regexp.h" #include "../Utils/StringLike.h" #include "LeafHostInfo.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "Shared/thread_count.h" #include "StringDictionaryClient.h" diff --git a/StringDictionary/StringDictionaryProxy.cpp b/StringDictionary/StringDictionaryProxy.cpp index 6d1d9c9026..d35aee3e44 100644 --- a/StringDictionary/StringDictionaryProxy.cpp +++ b/StringDictionary/StringDictionaryProxy.cpp @@ -18,7 +18,7 @@ #include "../Shared/sqltypes.h" #include "../Utils/Regexp.h" #include "../Utils/StringLike.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "Shared/thread_count.h" #include "StringDictionary.h" diff --git a/TableArchiver/TableArchiver.cpp b/TableArchiver/TableArchiver.cpp index 9b20e4ce02..54f9bee33c 100644 --- a/TableArchiver/TableArchiver.cpp +++ b/TableArchiver/TableArchiver.cpp @@ -33,9 +33,9 @@ #include "DataMgr/FileMgr/GlobalFileMgr.h" #include "LockMgr/LockMgr.h" +#include "Logger/Logger.h" #include "Parser/ParseDDL.h" #include "Shared/File.h" -#include "Shared/Logger.h" #include "Shared/StringTransform.h" #include "Shared/ThreadController.h" #include "Shared/measure.h" diff --git a/Tests/ArrowIpcIntegrationTest.cpp b/Tests/ArrowIpcIntegrationTest.cpp index 4d9abb252f..657ec8db10 100644 --- a/Tests/ArrowIpcIntegrationTest.cpp +++ b/Tests/ArrowIpcIntegrationTest.cpp @@ -40,9 +40,9 @@ using namespace ::apache::thrift; using namespace ::apache::thrift::protocol; using namespace ::apache::thrift::transport; +#include "Logger/Logger.h" #include "QueryEngine/CompilationOptions.h" #include "Shared/ArrowUtil.h" -#include "Shared/Logger.h" #include "Shared/ThriftClient.h" #include "gen-cpp/OmniSci.h" diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5eb47dd2a8..e0a69160c9 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -119,11 +119,11 @@ target_link_libraries(ResultSetTest ${EXECUTE_TEST_LIBS}) target_link_libraries(ColumnarResultsTest ${EXECUTE_TEST_LIBS}) target_link_libraries(FromTableReorderingTest ${EXECUTE_TEST_LIBS}) target_link_libraries(ResultSetBaselineRadixSortTest ${EXECUTE_TEST_LIBS}) -target_link_libraries(UtilTest Utils gtest Shared ${Boost_LIBRARIES}) +target_link_libraries(UtilTest Utils gtest Logger Shared ${Boost_LIBRARIES}) target_link_libraries(StringDictionaryTest ${EXECUTE_TEST_LIBS}) -target_link_libraries(StringTransformTest Shared gtest ${Boost_LIBRARIES}) +target_link_libraries(StringTransformTest Logger Shared gtest ${Boost_LIBRARIES}) target_link_libraries(StringFunctionsTest ${EXECUTE_TEST_LIBS}) -target_link_libraries(TokenCompletionHintsTest token_completion_hints gtest mapd_thrift Shared ${Boost_LIBRARIES}) +target_link_libraries(TokenCompletionHintsTest token_completion_hints gtest mapd_thrift Logger Shared ${Boost_LIBRARIES}) target_link_libraries(DumpRestoreTest ${EXECUTE_TEST_LIBS}) target_link_libraries(CodeGeneratorTest ${EXECUTE_TEST_LIBS}) target_link_libraries(ExecuteTest ${EXECUTE_TEST_LIBS}) @@ -150,18 +150,18 @@ if(ENABLE_KRB5) endif() target_link_libraries(OmniSQLUtilitiesTest gtest ${Boost_LIBRARIES}) -target_link_libraries(GeoTypesTest gtest Shared ${GDAL_LIBRARIES} ${CURL_LIBRARIES} ${GDALExtra_LIBRARIES} ${CMAKE_DL_LIBS}) +target_link_libraries(GeoTypesTest gtest Logger Shared ${GDAL_LIBRARIES} ${CURL_LIBRARIES} ${GDALExtra_LIBRARIES} ${CMAKE_DL_LIBS}) target_link_libraries(OverlapsJoinTest ${EXECUTE_TEST_LIBS}) target_link_libraries(CtasUpdateTest ${EXECUTE_TEST_LIBS}) target_link_libraries(CorrelatedSubqueryTest ${EXECUTE_TEST_LIBS}) -target_link_libraries(CtasIntegrationTest gtest Shared mapd_thrift ThriftClient ${LLVM_LINKER_FLAGS}) -target_link_libraries(DateTimeUtilsTest gtest Shared ${LLVM_LINKER_FLAGS}) +target_link_libraries(CtasIntegrationTest gtest Logger Shared mapd_thrift ThriftClient ${LLVM_LINKER_FLAGS}) +target_link_libraries(DateTimeUtilsTest gtest Logger Shared ${LLVM_LINKER_FLAGS}) target_link_libraries(CalciteOptimizeTest ${EXECUTE_TEST_LIBS}) target_link_libraries(JoinHashTableTest ${EXECUTE_TEST_LIBS}) target_link_libraries(CachedHashTableTest ${EXECUTE_TEST_LIBS}) target_link_libraries(RuntimeInterruptTest ${EXECUTE_TEST_LIBS}) -target_link_libraries(EncoderTest gtest DataMgr) -target_link_libraries(CommandLineTest gtest Shared ${Boost_LIBRARIES}) +target_link_libraries(EncoderTest gtest DataMgr Logger) +target_link_libraries(CommandLineTest gtest Logger Shared ${Boost_LIBRARIES}) # Requires thrift_handler for DBHandler test fixture target_link_libraries(DBObjectPrivilegesTest ${THRIFT_HANDLER_TEST_LIBRARIES}) target_link_libraries(ForeignServerDdlTest ${THRIFT_HANDLER_TEST_LIBRARIES}) @@ -187,7 +187,7 @@ endif() if("${MAPD_EDITION_LOWER}" STREQUAL "ee") target_link_libraries(UserMappingDdlTest ${THRIFT_HANDLER_TEST_LIBRARIES}) - target_link_libraries(PkiEncryptorTest gtest Shared) + target_link_libraries(PkiEncryptorTest gtest Logger Shared) endif() set(TEST_ARGS "--gtest_output=xml:../") @@ -262,7 +262,7 @@ if("${MAPD_EDITION_LOWER}" STREQUAL "ee") endif() add_executable(ArrowIpcIntegrationTest ArrowIpcIntegrationTest.cpp) -target_link_libraries(ArrowIpcIntegrationTest gtest ThriftClient mapd_thrift Shared ${CUDA_LIBRARIES} ${Arrow_LIBRARIES}) +target_link_libraries(ArrowIpcIntegrationTest gtest ThriftClient mapd_thrift Logger Shared ${CUDA_LIBRARIES} ${Arrow_LIBRARIES}) add_test(ArrowIpcIntegrationTest ArrowIpcIntegrationTest ${TEST_ARGS}) # parse s3 credentials diff --git a/Tests/CachedHashTableTest.cpp b/Tests/CachedHashTableTest.cpp index e1e1b62f16..74ee534861 100644 --- a/Tests/CachedHashTableTest.cpp +++ b/Tests/CachedHashTableTest.cpp @@ -27,12 +27,12 @@ #include "Catalog/Catalog.h" #include "Catalog/DBObject.h" #include "DataMgr/DataMgr.h" +#include "Logger/Logger.h" #include "QueryEngine/Execute.h" #include "QueryEngine/MurmurHash1Inl.h" #include "QueryEngine/ResultSet.h" #include "QueryEngine/UDFCompiler.h" #include "QueryRunner/QueryRunner.h" -#include "Shared/Logger.h" #include "Shared/SystemParameters.h" #include "TestHelpers.h" diff --git a/Tests/ColumnarResultsTest.cpp b/Tests/ColumnarResultsTest.cpp index 4764a327e9..f1a5427aa5 100644 --- a/Tests/ColumnarResultsTest.cpp +++ b/Tests/ColumnarResultsTest.cpp @@ -14,12 +14,12 @@ * limitations under the License. */ +#include "Logger/Logger.h" #include "QueryEngine/ColumnarResults.h" #include "QueryEngine/Descriptors/RowSetMemoryOwner.h" #include "QueryEngine/Execute.h" #include "QueryEngine/ResultSet.h" #include "QueryEngine/TargetValue.h" -#include "Shared/Logger.h" #include "Shared/TargetInfo.h" #include "Tests/ResultSetTestUtils.h" #include "Tests/TestHelpers.h" diff --git a/Tests/CommandLineTest.cpp b/Tests/CommandLineTest.cpp index bd14b6090d..64812b488c 100644 --- a/Tests/CommandLineTest.cpp +++ b/Tests/CommandLineTest.cpp @@ -25,7 +25,7 @@ #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "TestHelpers.h" namespace bp = boost::process; diff --git a/Tests/GpuSharedMemoryTest.h b/Tests/GpuSharedMemoryTest.h index 8a0448196a..c8a91c858a 100644 --- a/Tests/GpuSharedMemoryTest.h +++ b/Tests/GpuSharedMemoryTest.h @@ -17,13 +17,13 @@ #pragma once #include "CudaMgr/CudaMgr.h" +#include "Logger/Logger.h" #include "QueryEngine/CodeGenerator.h" #include "QueryEngine/GpuSharedMemoryUtils.h" #include "QueryEngine/LLVMFunctionAttributesUtil.h" #include "QueryEngine/NvidiaKernel.h" #include "QueryEngine/OutputBufferInitialization.h" #include "ResultSetTestUtils.h" -#include "Shared/Logger.h" #include "Shared/TargetInfo.h" #include "Shared/mapdpath.h" #include "TestHelpers.h" diff --git a/Tests/JoinHashTableTest.cpp b/Tests/JoinHashTableTest.cpp index 0be84638de..8342731f89 100644 --- a/Tests/JoinHashTableTest.cpp +++ b/Tests/JoinHashTableTest.cpp @@ -27,6 +27,7 @@ #include "Catalog/Catalog.h" #include "Catalog/DBObject.h" #include "DataMgr/DataMgr.h" +#include "Logger/Logger.h" #include "QueryEngine/Execute.h" #include "QueryEngine/ExtensionFunctionsWhitelist.h" #include "QueryEngine/ExternalCacheInvalidators.h" @@ -34,7 +35,6 @@ #include "QueryEngine/ResultSet.h" #include "QueryEngine/UDFCompiler.h" #include "QueryRunner/QueryRunner.h" -#include "Shared/Logger.h" #include "Shared/thread_count.h" #include "TestHelpers.h" diff --git a/Tests/MigrationMgrTest.cpp b/Tests/MigrationMgrTest.cpp index 5bcb8bf75e..221980d08a 100644 --- a/Tests/MigrationMgrTest.cpp +++ b/Tests/MigrationMgrTest.cpp @@ -21,9 +21,9 @@ #include #include "Catalog/Catalog.h" +#include "Logger/Logger.h" #include "MigrationMgr/MigrationMgr.h" #include "QueryRunner/QueryRunner.h" -#include "Shared/Logger.h" #include "Shared/scope.h" #ifndef BASE_PATH diff --git a/Tests/ParallelExecutorsTest.cpp b/Tests/ParallelExecutorsTest.cpp index f6b6aeddbb..74b0a5e354 100644 --- a/Tests/ParallelExecutorsTest.cpp +++ b/Tests/ParallelExecutorsTest.cpp @@ -16,7 +16,7 @@ #include "TestHelpers.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "../QueryEngine/Descriptors/RelAlgExecutionDescriptor.h" #include "../QueryEngine/Execute.h" diff --git a/Tests/PopulateTableRandom.cpp b/Tests/PopulateTableRandom.cpp index 26f065a2da..652c59d419 100644 --- a/Tests/PopulateTableRandom.cpp +++ b/Tests/PopulateTableRandom.cpp @@ -39,7 +39,7 @@ #include "../Shared/DateConverters.h" #include "../Shared/measure.h" #include "../Shared/sqltypes.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" using namespace Catalog_Namespace; using namespace Fragmenter_Namespace; diff --git a/Tests/ProfileTest.h b/Tests/ProfileTest.h index fd17e52b02..e16d0993e0 100644 --- a/Tests/ProfileTest.h +++ b/Tests/ProfileTest.h @@ -27,7 +27,7 @@ #include "../QueryEngine/GpuRtConstants.h" -#include "../Shared/Logger.h" +#include "../Logger/Logger.h" #ifdef HAVE_CUDA #include diff --git a/Tests/RuntimeInterruptTest.cpp b/Tests/RuntimeInterruptTest.cpp index 19a947eae7..f163bf9aa4 100644 --- a/Tests/RuntimeInterruptTest.cpp +++ b/Tests/RuntimeInterruptTest.cpp @@ -23,11 +23,11 @@ #include #include "Catalog/Catalog.h" +#include "Logger/Logger.h" #include "QueryEngine/CompilationOptions.h" #include "QueryEngine/Execute.h" #include "QueryEngine/ResultSet.h" #include "QueryRunner/QueryRunner.h" -#include "Shared/Logger.h" #include "Shared/StringTransform.h" using QR = QueryRunner::QueryRunner; diff --git a/Tests/TableUpdateDeleteBenchmark.cpp b/Tests/TableUpdateDeleteBenchmark.cpp index db120ff7d2..4532680621 100644 --- a/Tests/TableUpdateDeleteBenchmark.cpp +++ b/Tests/TableUpdateDeleteBenchmark.cpp @@ -22,9 +22,9 @@ #include #include "../ImportExport/Importer.h" +#include "../Logger/Logger.h" #include "../QueryEngine/ResultSet.h" #include "../QueryRunner/QueryRunner.h" -#include "../Shared/Logger.h" #ifndef BASE_PATH #define BASE_PATH "./tmp" diff --git a/Tests/TestHelpers.h b/Tests/TestHelpers.h index fd6a880e46..c4e1925d17 100644 --- a/Tests/TestHelpers.h +++ b/Tests/TestHelpers.h @@ -18,7 +18,7 @@ #define TEST_HELPERS_H_ #include "../QueryEngine/TargetValue.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "LeafHostInfo.h" diff --git a/Tests/UdfTest.cpp b/Tests/UdfTest.cpp index 0833e9c43b..5132a403ec 100644 --- a/Tests/UdfTest.cpp +++ b/Tests/UdfTest.cpp @@ -26,12 +26,12 @@ #include "Catalog/Catalog.h" #include "Catalog/DBObject.h" #include "DataMgr/DataMgr.h" +#include "Logger/Logger.h" #include "QueryEngine/Execute.h" #include "QueryEngine/ExtensionFunctionsWhitelist.h" #include "QueryEngine/ResultSet.h" #include "QueryEngine/UDFCompiler.h" #include "QueryRunner/QueryRunner.h" -#include "Shared/Logger.h" #include "TestHelpers.h" #ifndef BASE_PATH diff --git a/ThirdParty/muparserx/muparserx/mpFuncCommon.cpp b/ThirdParty/muparserx/muparserx/mpFuncCommon.cpp index 5d9a291d76..696fe380ca 100644 --- a/ThirdParty/muparserx/muparserx/mpFuncCommon.cpp +++ b/ThirdParty/muparserx/muparserx/mpFuncCommon.cpp @@ -40,7 +40,7 @@ #include "mpValue.h" #include "mpParserBase.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" MUP_NAMESPACE_START diff --git a/ThirdParty/muparserx/muparserx/mpFuncStr.cpp b/ThirdParty/muparserx/muparserx/mpFuncStr.cpp index c7493a4f88..d615006cbd 100644 --- a/ThirdParty/muparserx/muparserx/mpFuncStr.cpp +++ b/ThirdParty/muparserx/muparserx/mpFuncStr.cpp @@ -38,7 +38,7 @@ #include "mpValue.h" #include "mpError.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" MUP_NAMESPACE_START diff --git a/ThirdParty/muparserx/muparserx/mpOprtCmplx.cpp b/ThirdParty/muparserx/muparserx/mpOprtCmplx.cpp index 1a9d0710ed..8ea805e966 100644 --- a/ThirdParty/muparserx/muparserx/mpOprtCmplx.cpp +++ b/ThirdParty/muparserx/muparserx/mpOprtCmplx.cpp @@ -35,7 +35,7 @@ #include "mpOprtCmplx.h" #include #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" MUP_NAMESPACE_START diff --git a/ThirdParty/muparserx/muparserx/mpOprtMatrix.cpp b/ThirdParty/muparserx/muparserx/mpOprtMatrix.cpp index 48accdb7a4..f74eb3cf82 100644 --- a/ThirdParty/muparserx/muparserx/mpOprtMatrix.cpp +++ b/ThirdParty/muparserx/muparserx/mpOprtMatrix.cpp @@ -29,7 +29,7 @@ POSSIBILITY OF SUCH DAMAGE. */ #include "mpOprtMatrix.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" MUP_NAMESPACE_START diff --git a/ThirdParty/muparserx/muparserx/mpOprtNonCmplx.cpp b/ThirdParty/muparserx/muparserx/mpOprtNonCmplx.cpp index 1960a9594e..97e4af8f37 100644 --- a/ThirdParty/muparserx/muparserx/mpOprtNonCmplx.cpp +++ b/ThirdParty/muparserx/muparserx/mpOprtNonCmplx.cpp @@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. */ #include "mpOprtNonCmplx.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" MUP_NAMESPACE_START diff --git a/ThriftHandler/ConnectionInfo.h b/ThriftHandler/ConnectionInfo.h index 155700ada7..bbf0bfda27 100644 --- a/ThriftHandler/ConnectionInfo.h +++ b/ThriftHandler/ConnectionInfo.h @@ -18,7 +18,7 @@ #include -#include "Shared/Logger.h" +#include "Logger/Logger.h" enum class ClientProtocol { TCP, HTTP, Other }; diff --git a/ThriftHandler/DBHandler.h b/ThriftHandler/DBHandler.h index 1428c6673f..3d97659ebe 100644 --- a/ThriftHandler/DBHandler.h +++ b/ThriftHandler/DBHandler.h @@ -34,6 +34,7 @@ #include "Fragmenter/InsertOrderFragmenter.h" #include "ImportExport/Importer.h" #include "LockMgr/LockMgr.h" +#include "Logger/Logger.h" #include "Parser/ParserWrapper.h" #include "Parser/ReservedKeywords.h" #include "Parser/parser.h" @@ -45,7 +46,6 @@ #include "QueryEngine/JsonAccessors.h" #include "QueryEngine/QueryDispatchQueue.h" #include "QueryEngine/TableGenerations.h" -#include "Shared/Logger.h" #include "Shared/StringTransform.h" #include "Shared/SystemParameters.h" #include "Shared/geosupport.h" diff --git a/ThriftHandler/DistributedValidate.h b/ThriftHandler/DistributedValidate.h index 7a9671290b..2c48c9e1f2 100644 --- a/ThriftHandler/DistributedValidate.h +++ b/ThriftHandler/DistributedValidate.h @@ -18,7 +18,7 @@ #include #include "Catalog/Catalog.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "LeafAggregator.h" #include "MapDServer.h" diff --git a/ThriftHandler/QueryState.h b/ThriftHandler/QueryState.h index 1fe5828bf7..d8cfdad854 100644 --- a/ThriftHandler/QueryState.h +++ b/ThriftHandler/QueryState.h @@ -23,7 +23,7 @@ #ifndef OMNISCI_THRIFTHANDLER_QUERYSTATE_H #define OMNISCI_THRIFTHANDLER_QUERYSTATE_H -#include "Shared/Logger.h" +#include "Logger/Logger.h" #include "Shared/StringTransform.h" #include diff --git a/ThriftHandler/os/RenderHandler.cpp b/ThriftHandler/os/RenderHandler.cpp index f038858363..414f2cd735 100644 --- a/ThriftHandler/os/RenderHandler.cpp +++ b/ThriftHandler/os/RenderHandler.cpp @@ -23,7 +23,7 @@ #include "ThriftHandler/RenderHandler.h" -#include "Shared/Logger.h" +#include "Logger/Logger.h" class RenderHandler::Impl {}; diff --git a/docs/source/components/logger.rst b/docs/source/components/logger.rst index 96beb7d0bc..6089c6605b 100644 --- a/docs/source/components/logger.rst +++ b/docs/source/components/logger.rst @@ -2,7 +2,7 @@ Logger ====== -``#include "Shared/Logger.h"`` +``#include "Logger/Logger.h"`` The OmniSci Logger is based on `Boost.Log`_ with a design goal of being largely, though not completely, backward compatible with `glog`_ in usage, but with additional control over the logging format and other features. diff --git a/initdb.cpp b/initdb.cpp index c320f68b34..3ec071e6f2 100644 --- a/initdb.cpp +++ b/initdb.cpp @@ -25,8 +25,8 @@ #include "Catalog/Catalog.h" #include "ImportExport/Importer.h" +#include "Logger/Logger.h" #include "QueryRunner/QueryRunner.h" -#include "Shared/Logger.h" #include "Shared/mapdpath.h" #define CALCITEPORT 3279