Blamite Game Engine - blam!  00296.01.12.21.0102.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 
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  BlamCommandResult 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 }
BlamConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:57
logger.h
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:54
sentry.h
SENTRY_LEVEL_INFO
@ SENTRY_LEVEL_INFO
Definition: sentry.h:329
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message, BlamLogLevel severity)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:218
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.
BlamConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:56
WSV_NONE
#define WSV_NONE
Macro for 'None' log seveirty. Original pre-enum value was 0.
Definition: logger.h:16
Blam::Resources::Console::SentryTestCommand::SentryTestCommand
SentryTestCommand()
Definition: sentry_test.hpp:15
Blam::Resources::Console::SentryTestCommand::onCommand
BlamCommandResult onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: sentry_test.hpp:28
sentry_capture_event
SENTRY_API sentry_uuid_t sentry_capture_event(sentry_value_t event)
Sends a sentry event.
Blam::Resources::Console::SentryTestCommand
A command to test Sentry functionality.
Definition: sentry_test.hpp:12
BlamConsoleCommand::type
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:61
BlamCommandType::Builtin
@ Builtin
A command that is hard-coded into the engine.
CMD_OK
#define CMD_OK
Macro for OK command status. See #Blam::Resources::Console::Ok for more details.
Definition: console.h:8
BlamCommandResult
BlamCommandResult
Indicates the return state of a console command.
Definition: console.h:22
Blam::Logger
Namespace containing things related to the Blamite Logger.
Definition: logger.h:220
Blam::Resources::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5
Blam::Resources::Console::SentryTestCommand::~SentryTestCommand
~SentryTestCommand()
Definition: sentry_test.hpp:23