1
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
- // Copyright (c) 2009-2022 The Bitcoin Core developers
2
+ // Copyright (c) 2009-present The Bitcoin Core developers
3
3
// Distributed under the MIT software license, see the accompanying
4
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
@@ -245,10 +245,6 @@ static inline bool LogAcceptCategory(BCLog::LogFlags category, BCLog::Level leve
245
245
/* * Return true if str parses as a log category and set the flag */
246
246
bool GetLogCategory (BCLog::LogFlags& flag, std::string_view str);
247
247
248
- // Be conservative when using functions that
249
- // unconditionally log to debug.log! It should not be the case that an inbound
250
- // peer can fill up a user's disk with debug.log entries.
251
-
252
248
template <typename ... Args>
253
249
static inline void LogPrintf_ (std::string_view logging_function, std::string_view source_file, const int source_line, const BCLog::LogFlags flag, const BCLog::Level level, const char * fmt, const Args&... args)
254
250
{
@@ -267,6 +263,9 @@ static inline void LogPrintf_(std::string_view logging_function, std::string_vie
267
263
#define LogPrintLevel_ (category, level, ...) LogPrintf_(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
268
264
269
265
// Log unconditionally.
266
+ // Be conservative when using functions that unconditionally log to debug.log!
267
+ // It should not be the case that an inbound peer can fill up a user's storage
268
+ // with debug.log entries.
270
269
#define LogInfo (...) LogPrintLevel_(BCLog::LogFlags::ALL, BCLog::Level::Info, __VA_ARGS__)
271
270
#define LogWarning (...) LogPrintLevel_(BCLog::LogFlags::ALL, BCLog::Level::Warning, __VA_ARGS__)
272
271
#define LogError (...) LogPrintLevel_(BCLog::LogFlags::ALL, BCLog::Level::Error, __VA_ARGS__)
0 commit comments