mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-05-10 00:16:25 +02:00
Compare commits
3 Commits
3e3c7bff6b
...
806a5533ed
Author | SHA1 | Date | |
---|---|---|---|
Michael Cho | 806a5533ed | ||
Pavel Odintsov | 907454df86 | ||
Michael Cho | fad8757b89 |
|
@ -594,26 +594,26 @@ if (ENABLE_GOBGP_SUPPORT)
|
|||
target_link_libraries(gobgp_action absl::base absl::synchronization)
|
||||
endif()
|
||||
|
||||
# By default use module supplied by cmake to search for Protobuf
|
||||
set(FIND_PACKAGE_MODE_PROTOBUF "MODULE")
|
||||
|
||||
if (DO_NOT_USE_SYSTEM_LIBRARIES_FOR_BUILD)
|
||||
# We add our custom path to Protobuf to top of search_list used by find_package: https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html
|
||||
# This approach has advantage over Protobuf_DIR which requires us to set direct path to cmake folder of custom built dependency
|
||||
# which resides in vendor specific folder with name lib which may be lib64 on CentOS platforms:
|
||||
# protobuf_21_12/lib/cmake/protobuf or protobuf_21_12/lib64/cmake/protobuf on CentOS
|
||||
list(APPEND CMAKE_PREFIX_PATH ${PROTOCOL_BUFFERS_CUSTOM_INSTALL_PATH})
|
||||
|
||||
# Switch to use to configuration supplied by custom Protobuf installation as it may be better
|
||||
set(FIND_PACKAGE_MODE_PROTOBUF "CONFIG")
|
||||
|
||||
# Apparently it's required to set this flag because without this flag set it cannot find protoc when custom library path is in use
|
||||
# https://github.com/protocolbuffers/protobuf/issues/1931
|
||||
set(protobuf_MODULE_COMPATIBLE true)
|
||||
endif()
|
||||
|
||||
# https://cmake.org/cmake/help/latest/module/FindProtobuf.html
|
||||
find_package(Protobuf ${FIND_PACKAGE_MODE_PROTOBUF} REQUIRED)
|
||||
# Apparently it's required to set this flag because without this flag set it cannot find protoc when custom library path is in use
|
||||
# https://github.com/protocolbuffers/protobuf/issues/1931
|
||||
set(protobuf_MODULE_COMPATIBLE true)
|
||||
|
||||
# Switch to use to configuration supplied by custom Protobuf installation as it may be better
|
||||
find_package(Protobuf CONFIG)
|
||||
|
||||
if (NOT Protobuf_FOUND)
|
||||
# Fall back to module supplied by cmake to search for Protobuf
|
||||
# https://cmake.org/cmake/help/latest/module/FindProtobuf.html
|
||||
find_package(Protobuf MODULE REQUIRED)
|
||||
endif()
|
||||
|
||||
if (Protobuf_FOUND)
|
||||
message(STATUS "Found Protobuf ${Protobuf_VERSION}")
|
||||
|
|
|
@ -1413,7 +1413,7 @@ void init_logging(bool log_to_console) {
|
|||
logger.addAppender(appender);
|
||||
}
|
||||
|
||||
logger << log4cpp::Priority::INFO << "Logger initialized!";
|
||||
logger << log4cpp::Priority::INFO << "Logger initialized";
|
||||
}
|
||||
|
||||
void reconfigure_logging_level(const std::string& logging_level) {
|
||||
|
|
|
@ -63,7 +63,7 @@ void init_logging() {
|
|||
|
||||
logger.setPriority(log4cpp::Priority::INFO);
|
||||
logger.addAppender(appender);
|
||||
logger.info("Logger initialized!");
|
||||
logger.info("Logger initialized");
|
||||
}
|
||||
|
||||
void pcap_parse_packet(const char* flow_type, char* buffer, uint32_t len);
|
||||
|
|
|
@ -66,7 +66,7 @@ void init_logging() {
|
|||
|
||||
logger.setPriority(log4cpp::Priority::INFO);
|
||||
logger.addAppender(appender);
|
||||
logger.info("Logger initialized!");
|
||||
logger.info("Logger initialized");
|
||||
}
|
||||
|
||||
void process_packet(simple_packet& current_packet) {
|
||||
|
|
|
@ -74,7 +74,7 @@ void init_logging() {
|
|||
|
||||
logger.setPriority(log4cpp::Priority::INFO);
|
||||
logger.addAppender(appender);
|
||||
logger.info("Logger initialized!");
|
||||
logger.info("Logger initialized");
|
||||
}
|
||||
|
||||
uint64_t received_packets = 0;
|
||||
|
|
Loading…
Reference in New Issue