add sentry native project
This commit is contained in:
@@ -24,6 +24,7 @@ include_directories(ws ../third_party)
|
||||
include_directories(ws ../third_party/statsd-client-cpp/src)
|
||||
include_directories(ws ../third_party/spdlog/include)
|
||||
include_directories(ws ../third_party/cpp-linenoise)
|
||||
include_directories(ws ../third_party/sentry-native/include)
|
||||
|
||||
add_definitions(-DSPDLOG_COMPILED_LIB=1)
|
||||
|
||||
@@ -76,6 +77,7 @@ target_link_libraries(ws ixcore)
|
||||
target_link_libraries(ws ixsentry)
|
||||
|
||||
target_link_libraries(ws spdlog)
|
||||
target_link_libraries(ws sentry)
|
||||
|
||||
if(NOT APPLE AND NOT USE_MBED_TLS)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
15
ws/ws.cpp
15
ws/ws.cpp
@@ -9,6 +9,7 @@
|
||||
//
|
||||
#include "ws.h"
|
||||
|
||||
#include <sentry.h>
|
||||
#include <cli11/CLI11.hpp>
|
||||
#include <fstream>
|
||||
#include <ixcore/utils/IXCoreLogger.h>
|
||||
@@ -26,9 +27,21 @@
|
||||
#define getpid _getpid
|
||||
#endif
|
||||
|
||||
void initSentry()
|
||||
{
|
||||
sentry_options_t *options = sentry_options_new();
|
||||
|
||||
sentry_options_set_environment(options, "Production");
|
||||
sentry_options_set_release(options, "5fd7a6cd");
|
||||
// sentry_options_set_debug(options, 1);
|
||||
|
||||
sentry_init(options);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
initSentry();
|
||||
ix::initNetSystem();
|
||||
|
||||
ix::IXCoreLogger::LogFunc logFunc = [](const char* msg) { spdlog::info(msg); };
|
||||
@@ -368,6 +381,8 @@ int main(int argc, char** argv)
|
||||
tlsOptions.caFile = "NONE";
|
||||
}
|
||||
|
||||
// memset((char *)0x0, 1, 100);
|
||||
|
||||
int ret = 1;
|
||||
if (app.got_subcommand("transfer"))
|
||||
{
|
||||
|
Reference in New Issue
Block a user