sentry-cpp is a c/c++ client for Sentry
#include <Sentry.h>
int main(int argc, char** argv)
{
//Instantiate a new client with a compatible DSN
SENTRY.init("http://public:[email protected]/1");
//only title
SENTRY.error("title");
//title and message
SENTRY.info("title","message");
//send extra data
Json::Value extra;
SENTRY.info("title","message",&extra);
}
before you use sentry-cpp, you need install the following libraries.
next, you need edit the Makefile, and change the path for json-cpp and libcurl, now you can
make
it will generate static library(.a) and share library(.so), you can use sentry-cpp in three ways:
-
use source code, only Sentry.cpp and Sentry.h
-
use shared object
-
use static object
Enjoy!