Skip to content

Commit

Permalink
Merge branch 'rc' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Sep 18, 2024
2 parents 7944f35 + c63f14a commit bf225de
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion deps/cpp-sdk
Submodule cpp-sdk updated 2 files
+5 −5 ICore.h
+6 −1 objects/IEntity.h
12 changes: 7 additions & 5 deletions module/deps/Log.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

class Log
{
static constexpr const char* prefix = "[V8 Bytecode]";

std::stringstream buf;

typedef Log& (*LogFn)(Log&);
Expand Down Expand Up @@ -103,11 +105,11 @@ class Log
{
switch(log.type)
{
case INFO: alt::ICore::Instance().LogInfo(log.buf.str()); break;
case DEBUG: alt::ICore::Instance().LogDebug(log.buf.str().c_str()); break;
case WARNING: alt::ICore::Instance().LogWarning(log.buf.str().c_str()); break;
case ERROR: alt::ICore::Instance().LogError(log.buf.str().c_str()); break;
case COLORED: alt::ICore::Instance().LogColored(log.buf.str().c_str()); break;
case INFO: alt::ICore::Instance().LogInfo(prefix, log.buf.str()); break;
case DEBUG: alt::ICore::Instance().LogDebug(prefix, log.buf.str().c_str()); break;
case WARNING: alt::ICore::Instance().LogWarning(prefix, log.buf.str().c_str()); break;
case ERROR: alt::ICore::Instance().LogError(prefix, log.buf.str().c_str()); break;
case COLORED: alt::ICore::Instance().LogColored(prefix, log.buf.str().c_str()); break;
}

log.buf.str("");
Expand Down
6 changes: 3 additions & 3 deletions module/src/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class Logger : public BytecodeCompiler::ILogger
{
static constexpr const char* prefix = "[V8 Bytecode] ";
static constexpr const char* prefix = "[V8 Bytecode]";

public:
std::string GetHighlightColor() override
Expand All @@ -15,10 +15,10 @@ class Logger : public BytecodeCompiler::ILogger

void Log(const std::string& message) override
{
alt::ICore::Instance().LogColored(GetHighlightColor() + prefix + "~w~" + message);
alt::ICore::Instance().LogColored(prefix, message);
}
void LogError(const std::string& message) override
{
alt::ICore::Instance().LogError(std::string(prefix) + " " + message);
alt::ICore::Instance().LogError(std::string(prefix), message);
}
};

0 comments on commit bf225de

Please sign in to comment.