aboutsummaryrefslogtreecommitdiff
path: root/src/logging.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/logging.h')
-rw-r--r--src/logging.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/logging.h b/src/logging.h
index 1ccf9136fd..c27a71168b 100644
--- a/src/logging.h
+++ b/src/logging.h
@@ -11,6 +11,8 @@
#include <atomic>
#include <cstdint>
+#include <list>
+#include <mutex>
#include <string>
#include <vector>
@@ -59,6 +61,10 @@ namespace BCLog {
class Logger
{
private:
+ FILE* fileout = nullptr;
+ std::mutex mutexDebugLog;
+ std::list<std::string> vMsgsBeforeOpenLog;
+
/**
* fStartedNewLine is a state variable that will suppress printing of
* the timestamp when multiple calls are made that don't end in a
@@ -82,6 +88,10 @@ namespace BCLog {
/** Returns whether logs will be written to any output */
bool Enabled() const { return fPrintToConsole || fPrintToDebugLog; }
+
+ fs::path GetDebugLogPath() const;
+ bool OpenDebugLog();
+ void ShrinkDebugFile();
};
} // namespace BCLog
@@ -141,8 +151,4 @@ template<typename T, typename... Args> static inline void MarkUsed(const T& t, c
} while(0)
#endif
-fs::path GetDebugLogPath();
-bool OpenDebugLog();
-void ShrinkDebugFile();
-
#endif // BITCOIN_LOGGING_H