Fix AsyncFileLog building without threads.

This commit is contained in:
levlam 2022-11-09 14:48:14 +03:00
parent 52aa76584a
commit 8b4bc80860
2 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,8 @@
namespace td { namespace td {
#if !TD_THREAD_UNSUPPORTED
Status AsyncFileLog::init(string path, int64 rotate_threshold, bool redirect_stderr) { Status AsyncFileLog::init(string path, int64 rotate_threshold, bool redirect_stderr) {
CHECK(path_.empty()); CHECK(path_.empty());
CHECK(!path.empty()); CHECK(!path.empty());
@ -149,4 +151,6 @@ void AsyncFileLog::do_append(int log_level, CSlice slice) {
} }
} }
#endif
} // namespace td } // namespace td

View File

@ -15,6 +15,8 @@
namespace td { namespace td {
#if !TD_THREAD_UNSUPPORTED
class AsyncFileLog final : public LogInterface { class AsyncFileLog final : public LogInterface {
public: public:
AsyncFileLog() = default; AsyncFileLog() = default;
@ -44,4 +46,6 @@ class AsyncFileLog final : public LogInterface {
void do_append(int log_level, CSlice slice) final; void do_append(int log_level, CSlice slice) final;
}; };
#endif
} // namespace td } // namespace td