mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 08:15:35 +00:00
macros im really starting to appreciate that windows API includes clash with each other because of macros, its super fun
30 lines
829 B
C++
30 lines
829 B
C++
#ifndef SENTRY_H
|
|
#define SENTRY_H
|
|
|
|
#include <sentry.h>
|
|
|
|
#include <string>
|
|
|
|
// TODO possibly use attach_stacktrace
|
|
|
|
// singleton, dont make this twice
|
|
class TSentry final {
|
|
public:
|
|
TSentry(const std::string& SentryUrl);
|
|
~TSentry();
|
|
|
|
void PrintWelcome();
|
|
void Log(sentry_level_t level, const std::string& logger, const std::string& text);
|
|
void AddExtra(const std::string& key, const sentry_value_t& value);
|
|
void AddExtra(const std::string& key, const std::string& value);
|
|
void LogException(const std::exception& e, const std::string& file, const std::string& line);
|
|
void AddErrorBreadcrumb(const std::string& msg, const std::string& file, const std::string& line);
|
|
// cleared when Logged
|
|
void SetTransaction(const std::string& id);
|
|
|
|
private:
|
|
bool mValid { true };
|
|
};
|
|
|
|
#endif // SENTRY_H
|