aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-07-29 12:08:48 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-09-17 18:21:23 +0200
commitfacbcd4cef8890ae18976fb53b67ea56b3c04454 (patch)
treedd31aa121b7ca8ce1730d1aaf138bc2b77c1929d /test
parentfae9b60c4ffef38d9725f42f992b1f38765312a3 (diff)
log: Use ConstevalFormatString
This changes all logging (including the wallet logging) to produce a ConstevalFormatString at compile time, so that the format string can be validated at compile-time. Also, while touching the wallet logging, avoid a copy of the template Params by using const Params&.
Diffstat (limited to 'test')
-rwxr-xr-xtest/lint/lint-format-strings.py8
-rwxr-xr-xtest/lint/run-lint-format-strings.py5
2 files changed, 0 insertions, 13 deletions
diff --git a/test/lint/lint-format-strings.py b/test/lint/lint-format-strings.py
index c30975fea7..a809851ec6 100755
--- a/test/lint/lint-format-strings.py
+++ b/test/lint/lint-format-strings.py
@@ -17,15 +17,7 @@ import sys
FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS = [
'tfm::format,1', # Assuming tfm::::format(std::ostream&, ...
- 'LogError,0',
- 'LogWarning,0',
- 'LogInfo,0',
- 'LogDebug,1',
- 'LogTrace,1',
- 'LogPrintf,0',
- 'LogPrintLevel,2',
'strprintf,0',
- 'WalletLogPrintf,0',
]
RUN_LINT_FILE = 'test/lint/run-lint-format-strings.py'
diff --git a/test/lint/run-lint-format-strings.py b/test/lint/run-lint-format-strings.py
index a32717653a..d3c0ac92e5 100755
--- a/test/lint/run-lint-format-strings.py
+++ b/test/lint/run-lint-format-strings.py
@@ -15,11 +15,6 @@ import sys
FALSE_POSITIVES = [
("src/clientversion.cpp", "strprintf(_(COPYRIGHT_HOLDERS).translated, COPYRIGHT_HOLDERS_SUBSTITUTION)"),
("src/test/translation_tests.cpp", "strprintf(format, arg)"),
- ("src/validationinterface.cpp", "LogDebug(BCLog::VALIDATION, fmt \"\\n\", __VA_ARGS__)"),
- ("src/wallet/wallet.h", "WalletLogPrintf(const char* fmt, Params... parameters)"),
- ("src/wallet/wallet.h", "LogPrintf((\"%s \" + std::string{fmt}).c_str(), GetDisplayName(), parameters...)"),
- ("src/wallet/scriptpubkeyman.h", "WalletLogPrintf(const char* fmt, Params... parameters)"),
- ("src/wallet/scriptpubkeyman.h", "LogPrintf((\"%s \" + std::string{fmt}).c_str(), m_storage.GetDisplayName(), parameters...)"),
]