Blamite Game Engine - Blam (Core)
sentry_test.hpp
Go to the documentation of this file.
1 #include "../console.h"
4 namespace Blam::Console
5 {
10  {
11  public:
13  {
14  name = "sentry_test";
15  description = "Throws Sentry Test Event to dashboard.";
16 
18  }
19 
21  {
22  delete this;
23  }
24 
25  CommandStatus onCommand(std::vector<std::string> arguments)
26  {
27  using namespace Blam::Logger;
28 
29  LogEventForce("sending test event to sentry", WSV_NONE);
30 
32  /* level */ SENTRY_LEVEL_INFO,
33  /* logger */ "custom",
34  /* message */ "Halo broke something, someone call the cops"
35  ));
36 
37  return CMD_OK;
38  }
39  };
40 }
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:12
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:20
Blam::Console::SentryTestCommand
Definition: sentry_test.hpp:9
Blam::Console::SentryTestCommand::onCommand
CommandStatus onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: sentry_test.hpp:25