Add NullLog.h.
This commit is contained in:
parent
f72195baab
commit
674a112bfa
@ -32,6 +32,7 @@
|
||||
#include "td/utils/algorithm.h"
|
||||
#include "td/utils/ExitGuard.h"
|
||||
#include "td/utils/FileLog.h"
|
||||
#include "td/utils/NullLog.h"
|
||||
#include "td/utils/logging.h"
|
||||
#include "td/utils/misc.h"
|
||||
#include "td/utils/port/detail/NativeFd.h"
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "td/utils/JsonBuilder.h"
|
||||
#include "td/utils/logging.h"
|
||||
#include "td/utils/misc.h"
|
||||
#include "td/utils/NullLog.h"
|
||||
#include "td/utils/OptionParser.h"
|
||||
#include "td/utils/port/FileFd.h"
|
||||
#include "td/utils/port/PollFlags.h"
|
||||
|
@ -221,6 +221,7 @@ set(TDUTILS_SOURCE
|
||||
td/utils/MpscPollableQueue.h
|
||||
td/utils/MpscLinkQueue.h
|
||||
td/utils/Named.h
|
||||
td/utils/NullLog.h
|
||||
td/utils/ObjectPool.h
|
||||
td/utils/Observer.h
|
||||
td/utils/optional.h
|
||||
|
19
tdutils/td/utils/NullLog.h
Normal file
19
tdutils/td/utils/NullLog.h
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#include "td/utils/logging.h"
|
||||
#include "td/utils/Slice.h"
|
||||
|
||||
namespace td {
|
||||
|
||||
class NullLog : public LogInterface {
|
||||
void do_append(int /*log_level*/, CSlice /*slice*/) final {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace td
|
@ -177,11 +177,6 @@ class LogInterface {
|
||||
virtual void do_append(int log_level, CSlice slice) = 0;
|
||||
};
|
||||
|
||||
class NullLog : public LogInterface {
|
||||
void do_append(int /*log_level*/, CSlice /*slice*/) final {
|
||||
}
|
||||
};
|
||||
|
||||
extern LogInterface *const default_log_interface;
|
||||
extern LogInterface *log_interface;
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "td/utils/format.h"
|
||||
#include "td/utils/logging.h"
|
||||
#include "td/utils/MemoryLog.h"
|
||||
#include "td/utils/NullLog.h"
|
||||
#include "td/utils/port/path.h"
|
||||
#include "td/utils/port/thread.h"
|
||||
#include "td/utils/Slice.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user