diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2025-11-04 19:23:44 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2025-11-04 20:48:56 -0500 |
| commit | 21324fa57b44ba77e46be4952a02484cb8c3ef5c (patch) | |
| tree | 7cb747c5c1a670ac799596e5bc645931f1f69a39 /binaryninjaapi.h | |
| parent | 864374e250e87901bbbad66086abb9c0b5924022 (diff) | |
Remove indenting APIs from Logger. These are thread unsafe by design.
Loggers are not owned by a specific thread and many are used by multiple threads. The indenting APIs could not be made to be thread safe in any way as they exist, so they have been removed. The data races caused by the indenting APIs are actually an important stability issue that could cause the indentation level to go out of bounds and crash the product.
If you were using the indentation APIs, you will need to rewrite the usage to manually manage the indentation level in a thread safe way.
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index b8dde5cd..d3de5874 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -1870,24 +1870,6 @@ namespace BinaryNinja { \return The logger session ID */ size_t GetSessionId(); - - /*! Indent the logger's indentation level by one - */ - void Indent(); - - /*! Decrease the logger's indentation level by one - */ - void Dedent(); - - /*! Set the logger's indentation level to zero - */ - void ResetIndent(); - - /*! Get the string to prepend to log messages to indent them - - \return Indentation string - */ - std::string GetIndent() const; }; /*! A class allowing registering and retrieving Loggers @@ -1948,24 +1930,6 @@ namespace BinaryNinja { static std::vector<std::string> GetLoggerNames(); }; - /*! RAII helper that indents/dedents a Logger inside a scope - \ingroup logging - */ - class LoggerIndentScope - { - Ref<Logger> m_logger; - - public: - LoggerIndentScope(Ref<Logger> logger): m_logger(logger) - { - m_logger->Indent(); - } - ~LoggerIndentScope() - { - m_logger->Dedent(); - } - }; - /*! @addtogroup coreapi @{ |
