summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2024-09-25 17:34:52 -0400
committerGlenn Smith <glenn@vector35.com>2024-10-14 16:58:47 -0400
commit7949573575297807243040469279622396817803 (patch)
treee182525bfd808720514f8782b44780315c4d833c
parent9779664178534903236695755478467025901462 (diff)
Add missing Logger::Indent functions
-rw-r--r--binaryninjaapi.h4
-rw-r--r--binaryninjacore.h3
-rw-r--r--log.cpp18
3 files changed, 25 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 3db0f9d1..4c725da6 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -1055,6 +1055,10 @@ namespace BinaryNinja {
\return The logger session ID
*/
size_t GetSessionId();
+
+ void Indent();
+ void Dedent();
+ void ResetIndent();
};
/*! A class allowing registering and retrieving Loggers
diff --git a/binaryninjacore.h b/binaryninjacore.h
index 0cc40e5c..a1759a46 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -3449,6 +3449,9 @@ extern "C"
BINARYNINJACOREAPI char* BNLoggerGetName(BNLogger* logger);
BINARYNINJACOREAPI size_t BNLoggerGetSessionId(BNLogger* logger);
+ BINARYNINJACOREAPI void BNLoggerIndent(BNLogger* logger);
+ BINARYNINJACOREAPI void BNLoggerDedent(BNLogger* logger);
+ BINARYNINJACOREAPI void BNLoggerResetIndent(BNLogger* logger);
BINARYNINJACOREAPI BNLogger* BNLogCreateLogger(const char* loggerName, size_t sessionId);
BINARYNINJACOREAPI BNLogger* BNLogGetLogger(const char* loggerName, size_t sessionId);
BINARYNINJACOREAPI char** BNLogGetLoggerNames(size_t* count);
diff --git a/log.cpp b/log.cpp
index f9e5029e..0920be16 100644
--- a/log.cpp
+++ b/log.cpp
@@ -380,6 +380,24 @@ size_t Logger::GetSessionId()
}
+void Logger::Indent()
+{
+ BNLoggerIndent(m_object);
+}
+
+
+void Logger::Dedent()
+{
+ BNLoggerDedent(m_object);
+}
+
+
+void Logger::ResetIndent()
+{
+ BNLoggerResetIndent(m_object);
+}
+
+
Ref<Logger> LogRegistry::CreateLogger(const std::string& loggerName, size_t sessionId)
{
return new Logger(BNLogCreateLogger(loggerName.c_str(), sessionId));