diff options
author | Jim Posen <jimpo@coinbase.com> | 2018-04-11 11:12:51 -0700 |
---|---|---|
committer | Jim Posen <jimpo@coinbase.com> | 2018-04-27 16:10:00 -0700 |
commit | 6a6d764ca5616e5d1f1848b0010613c49bd38e61 (patch) | |
tree | 5cf9465c2d303b9d8fbc8ad798ac78e60dea063b /src/logging.h | |
parent | f55f4fcf05a53fdf618b4c69ddcf4c43b14e84c2 (diff) |
util: Move debug file management functions into Logger.
Diffstat (limited to 'src/logging.h')
-rw-r--r-- | src/logging.h | 14 |
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 |