Blamite Game Engine - blam!  00263.10.17.20.0001.blamite
The core library for the Blamite Game Engine.
sentry_test.hpp
Go to the documentation of this file.
1 #include "../console.h"
2 
5 
6 namespace Blam::Console
7 {
13  {
14  public:
16  {
17  name = "sentry_test";
18  description = "Throws Sentry Test Event to dashboard.";
19 
21  }
22 
24  {
25  delete this;
26  }
27 
28  CommandStatus onCommand(std::vector<std::string> arguments)
29  {
30  using namespace Blam::Logger;
31 #ifdef BLAM_64_BIT
32  LogEventForce("sending test event to sentry", WSV_NONE);
33 
35  /* level */ SENTRY_LEVEL_INFO,
36  /* logger */ "custom",
37  /* message */ "Halo broke something, someone call the cops"
38  ));
39 #else
40  LogEventForce("cannot send test event to sentry, running in 32 bit mode", WSV_NONE);
41 #endif
42 
43  return CMD_OK;
44  }
45  };
46 }
Blam::Console::ConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:73
Blam::Console::ConsoleCommand::type
CommandType type
The type of command this is. See Blam::Console::CommandType for more information.
Definition: console.h:77
Blam::Console::CommandStatus
CommandStatus
Indicates the return state of a console command.
Definition: console.h:28
logger.h
sentry.h
SENTRY_LEVEL_INFO
@ SENTRY_LEVEL_INFO
Definition: sentry.h:329
Blam::Console::SentryTestCommand::SentryTestCommand
SentryTestCommand()
Definition: sentry_test.hpp:15
Blam::Console::Builtin
@ Builtin
A command that is hard-coded into the engine.
Definition: console.h:41
Blam::Console::ConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:70
sentry_value_new_message_event
SENTRY_API sentry_value_t sentry_value_new_message_event(sentry_level_t level, const char *logger, const char *text)
Creates a new message event value.
WSV_NONE
#define WSV_NONE
Macro for 'None' log seveirty. Original pre-enum value was 0.
Definition: logger.h:15
sentry_capture_event
SENTRY_API sentry_uuid_t sentry_capture_event(sentry_value_t event)
Sends a sentry event.
Blam::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5
Blam::Console::ConsoleCommand
Class used to represent a console command.
Definition: console.h:50
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message, LogSeverity severity)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:137
CMD_OK
#define CMD_OK
Macro for OK command status. See Blam::Console::Ok for more details.
Definition: console.h:9
Blam::Logger
Namespace containing things related to the Blamite Logger.
Definition: logger.h:44
Blam::Console::SentryTestCommand::~SentryTestCommand
~SentryTestCommand()
Definition: sentry_test.hpp:23
Blam::Console::SentryTestCommand
A command to test Sentry functionality.
Definition: sentry_test.hpp:12
Blam::Console::SentryTestCommand::onCommand
CommandStatus onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: sentry_test.hpp:28