Index: src/liblogger/TLogFile.h =================================================================== diff -u -N -r7de00e54431d78b6c54fad6fb163dbc306381ef5 -r545098ae76e9ce23598d37d2bee4020d6cb59f3c --- src/liblogger/TLogFile.h (.../TLogFile.h) (revision 7de00e54431d78b6c54fad6fb163dbc306381ef5) +++ src/liblogger/TLogFile.h (.../TLogFile.h) (revision 545098ae76e9ce23598d37d2bee4020d6cb59f3c) @@ -26,37 +26,39 @@ namespace logger { - // not exportable - class TLogFile + namespace internal { - public: - static const time_t MaxHandleCacheTime = 60; + class TLogFile + { + public: + static const time_t MaxHandleCacheTime = 60; - public: - TLogFile(PCTSTR pszPath, const TLoggerRotationInfoPtr& spRotationInfo); + public: + TLogFile(PCTSTR pszPath, const TLoggerRotationInfoPtr& spRotationInfo); - void Write(std::list& pszData); - void CloseIfUnused(); - void CloseLogFile(); + void Write(std::list& pszData); + void CloseIfUnused(); + void CloseLogFile(); - private: - HANDLE GetFileHandle(); - unsigned long long GetCurrentLogSize(); - void RotateFile(); - void RemoveObsoleteRotatedLogs(); - void ScanForRotatedLogs(); - bool NeedRotation(size_t stDataSize); + private: + HANDLE GetFileHandle(); + unsigned long long GetCurrentLogSize(); + void RotateFile(); + void RemoveObsoleteRotatedLogs(); + void ScanForRotatedLogs(); + bool NeedRotation(size_t stDataSize); - private: - std::wstring m_strLogPath; + private: + std::wstring m_strLogPath; - time_t m_timeLastWriteTime = 0; - std::shared_ptr m_spFileHandle; + time_t m_timeLastWriteTime = 0; + std::shared_ptr m_spFileHandle; - // rotation - TLoggerRotationInfoPtr m_spRotationInfo; - std::vector m_vRotatedFiles; - }; + // rotation + TLoggerRotationInfoPtr m_spRotationInfo; + std::vector m_vRotatedFiles; + }; + } } #endif