ClickHouse/src/Common
Azat Khuzhin bedf208cbd Use fmt::runtime() for LOG_* for non constexpr
Here is oneliner:

    $ gg 'LOG_\(DEBUG\|TRACE\|INFO\|TEST\|WARNING\|ERROR\|FATAL\)([^,]*, [a-zA-Z]' -- :*.cpp :*.h | cut -d: -f1 | sort -u | xargs -r sed -E -i 's#(LOG_[A-Z]*)\(([^,]*), ([A-Za-z][^,)]*)#\1(\2, fmt::runtime(\3)#'

Note, that I tried to do this with coccinelle (tool for semantic
patchin), but it cannot parse C++:

    $ cat fmt.cocci
    @@
    expression log;
    expression var;
    @@

    -LOG_DEBUG(log, var)
    +LOG_DEBUG(log, fmt::runtime(var))

I've also tried to use some macros/templates magic to do this implicitly
in logger_useful.h, but I failed to do so, and apparently it is not
possible for now.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

v2: manual fixes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:03 +03:00
..
Config Update sort to pdqsort 2022-01-30 19:49:48 +00:00
examples Merge pull request #33842 from azat/cmake-contrib-fixes 2022-01-22 10:34:54 +03:00
HashTable HashTable constant fix 2022-01-11 18:45:41 +03:00
mysqlxx Update Types.h 2022-01-25 16:42:55 +03:00
StringUtils Add trimLeft() and trimRight() overloads for strings. 2021-08-23 23:41:45 +03:00
tests fixed code styles 2022-01-29 09:46:00 +08:00
ZooKeeper Separate base parts out of SystemLog 2022-01-25 18:48:43 +08:00
ActionBlocker.h dbms/ → src/ 2020-04-03 18:14:31 +03:00
ActionLock.cpp
ActionLock.h
AlignedBuffer.cpp
AlignedBuffer.h
Allocator_fwd.h
Allocator.cpp Common types template instantiations 2021-02-12 00:54:50 +03:00
Allocator.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
AllocatorWithMemoryTracking.h Fix some OOMs in stress tests 2021-03-31 06:19:34 +03:00
Arena.h done 2021-04-09 00:22:18 +03:00
ArenaAllocator.h
ArenaWithFreeLists.h
ArrayCache.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
assert_cast.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
BitHelpers.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
checkStackSize.cpp Fix tests that relies on checking stack size under TSan 2021-10-23 14:09:19 +03:00
checkStackSize.h
clearPasswordFromCommandLine.cpp Miscellaneous 2021-10-31 18:11:46 +03:00
clearPasswordFromCommandLine.h
clickhouse_malloc.cpp Fix compatibility 2021-08-06 02:10:55 +03:00
ClickHouseRevision.cpp Remove cruft 2021-10-28 02:10:39 +03:00
ClickHouseRevision.h
CMakeLists.txt Remove unbundled mysql support 2022-01-20 10:02:01 +03:00
ColumnsHashing.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
ColumnsHashingImpl.h Support conditions in JOIN ON section (#24420) 2021-07-21 20:03:33 +03:00
CombinedCardinalityEstimator.h HashTable constant fix 2022-01-11 18:45:41 +03:00
CompactArray.h Remove cruft 2021-10-28 02:10:39 +03:00
ConcurrentBoundedQueue.h Fixed tests 2021-10-14 00:33:18 +03:00
config_version.h.in Add comments for VERSION_REVISION vs DBMS_TCP_PROTOCOL_VERSION 2021-06-28 22:01:14 +03:00
config.h.in Cleanup jemalloc contrib 2022-01-20 10:02:03 +03:00
CounterInFile.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
COW.h
CpuId.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
createHardLink.cpp
createHardLink.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
CurrentMemoryTracker.cpp Remove debug headers 2021-08-05 23:50:09 +03:00
CurrentMemoryTracker.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
CurrentMetrics.cpp rename Committed state to Active 2021-12-30 23:45:38 +03:00
CurrentMetrics.h Introduce ProfileEvents packet 2021-10-11 17:29:50 +03:00
CurrentThread.cpp WIP on ProfileEvents forwarding 2021-10-11 17:39:23 +03:00
CurrentThread.h WIP on ProfileEvents forwarding 2021-10-11 17:39:23 +03:00
DateLUT.cpp Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00
DateLUT.h Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00
DateLUTImpl.cpp Saturate date/datetime to zero 2022-01-03 02:07:08 +03:00
DateLUTImpl.h Saturate date/datetime to zero 2022-01-03 02:07:08 +03:00
DNSResolver.cpp Use fmt::runtime() for LOG_* for non constexpr 2022-02-01 14:30:03 +03:00
DNSResolver.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Dwarf.cpp Updated additional cases 2021-12-20 15:55:07 +03:00
Dwarf.h Upd upstream 2021-05-28 00:21:02 +03:00
Elf.cpp just more verbose comment 2021-11-23 12:56:14 +00:00
Elf.h get Build ID via Section headers first 2021-11-23 12:56:14 +00:00
Epoll.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Epoll.h Poco::Timespan reference fix 2021-04-29 19:11:20 +03:00
ErrorCodes.cpp Merge branch 'master' into formats-with-suffixes 2022-01-14 16:45:20 +03:00
ErrorCodes.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
escapeForFileName.cpp
escapeForFileName.h
EventCounter.h
Exception.cpp Move LockMemoryExceptionInThread and MemoryTrackerBlockerInThread 2022-01-10 22:39:10 +03:00
Exception.h Add fmt::runtime() in Exception ctor 2022-02-01 14:30:03 +03:00
ExponentiallySmoothedCounter.h Clarifications 2021-09-19 20:58:10 +03:00
ExternalLoaderStatus.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Fiber.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
FiberStack.h Review comments 2021-12-22 13:39:45 -08:00
FieldVisitorConvertToNumber.h Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitorDump.cpp Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitorDump.h Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitorHash.cpp Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitorHash.h Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitors.h Minor changes 2021-06-14 07:13:35 +03:00
FieldVisitorsAccurateComparison.h Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitorSum.cpp Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitorSum.h Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitorToString.cpp Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitorToString.h Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitorWriteBinary.cpp Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FieldVisitorWriteBinary.h Some improvements and fixes for Bool data type 2022-01-20 14:16:11 +03:00
FileChecker.cpp Support BACKUP & RESTORE for log family. 2021-11-01 12:07:17 +03:00
FileChecker.h Support BACKUP & RESTORE for log family. 2021-11-01 12:07:17 +03:00
filesystemHelpers.cpp fix 2021-10-17 14:49:27 +00:00
filesystemHelpers.h fix 2021-10-17 14:49:27 +00:00
FileUpdatesTracker.h File movement 2021-05-29 00:57:53 +03:00
formatIPv6.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
formatIPv6.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
formatReadable.cpp Update formatReadable.cpp 2021-03-31 18:40:33 +03:00
formatReadable.h
FrequencyHolder.h Better 2022-01-10 20:30:26 +00:00
getCurrentProcessFDCount.cpp Slightly better 2021-11-19 12:30:58 +03:00
getCurrentProcessFDCount.h code style change 2021-11-12 20:48:42 +08:00
getExecutablePath.cpp
getExecutablePath.h
getHashOfLoadedBinary.cpp Upd upstream 2021-05-28 00:21:02 +03:00
getHashOfLoadedBinary.h
getMappedArea.cpp
getMappedArea.h
getMaxFileDescriptorCount.cpp Slightly better 2021-11-19 12:30:58 +03:00
getMaxFileDescriptorCount.h code style change 2021-11-12 20:48:42 +08:00
getMultipleKeysFromConfig.cpp
getMultipleKeysFromConfig.h
getNumberOfPhysicalCPUCores.cpp Fix cpu count with cgroup limits 2022-01-21 21:03:23 +08:00
getNumberOfPhysicalCPUCores.h
getRandomASCIIString.cpp Fix clang tidy 2021-12-14 15:34:20 +03:00
getRandomASCIIString.h Fix clang tidy 2021-12-14 15:34:20 +03:00
getResource.cpp Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00
getResource.h Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00
hasLinuxCapability.cpp another removes 2020-07-30 13:31:14 +03:00
hasLinuxCapability.h
hex.cpp add bin/unbin support 2021-07-02 23:13:47 +08:00
hex.h Switch to XML format for backup's metadata. 2021-11-09 23:16:45 +03:00
HyperLogLogBiasEstimator.h
HyperLogLogCounter.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
HyperLogLogWithSmallSetOptimization.h
IFactoryWithAliases.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Increment.h
interpolate.h
InterruptListener.h
IntervalKind.cpp support INTERVAL type in WITH FILL 2021-10-31 19:42:43 +03:00
IntervalKind.h support INTERVAL type in WITH FILL 2021-10-31 19:42:43 +03:00
IntervalTree.h Update sort to pdqsort 2022-01-30 19:49:48 +00:00
intExp.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
IO.cpp Add writeRetry helper 2021-06-07 09:38:15 +03:00
IO.h Add writeRetry helper 2021-06-07 09:38:15 +03:00
IPv6ToBinary.cpp Fix build isIPAddressContainedIn 2021-03-29 16:28:51 +03:00
IPv6ToBinary.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
isLocalAddress.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
isLocalAddress.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
isValidUTF8.cpp Move isValidUTF8Naive from Functions to Common 2021-08-23 09:22:15 +03:00
isValidUTF8.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
JSONBuilder.cpp Use JSONBuilder for explain json result. 2021-04-14 17:07:56 +03:00
JSONBuilder.h Fix PVS-Studio 2021-10-11 14:28:46 +03:00
LocalDate.h Remove unused code 2021-12-24 12:25:27 +03:00
LocalDateTime.h Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00
LockMemoryExceptionInThread.cpp Move LockMemoryExceptionInThread and MemoryTrackerBlockerInThread 2022-01-10 22:39:10 +03:00
LockMemoryExceptionInThread.h fix build on USE_DEBUG_HELPERS OFF 2022-01-24 14:29:38 +08:00
LRUCache.h change LRUCache to LRUResourceCache 2022-01-04 15:19:09 +08:00
LRUResourceCache.h fixed some bugs 2022-01-12 17:01:05 +08:00
Macros.cpp Use shard and replica name from Replicated database arguments (#31488) 2021-11-23 12:41:54 +03:00
Macros.h Use shard and replica name from Replicated database arguments (#31488) 2021-11-23 12:41:54 +03:00
malloc.cpp Preparation to build with Musl 2021-10-16 00:17:34 +03:00
memcmpSmall.h Add x86 feature avx512 support for memcmpSmall 2022-01-14 20:21:22 +08:00
memcpySmall.h
memory.h Cleanup jemalloc contrib 2022-01-20 10:02:03 +03:00
MemorySanitizer.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
MemoryStatisticsOS.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
MemoryStatisticsOS.h Fix typo in comment 2021-05-04 10:54:13 +03:00
MemoryTracker.cpp Move LockMemoryExceptionInThread and MemoryTrackerBlockerInThread 2022-01-10 22:39:10 +03:00
MemoryTracker.h Move LockMemoryExceptionInThread and MemoryTrackerBlockerInThread 2022-01-10 22:39:10 +03:00
MemoryTrackerBlockerInThread.cpp Move LockMemoryExceptionInThread and MemoryTrackerBlockerInThread 2022-01-10 22:39:10 +03:00
MemoryTrackerBlockerInThread.h fix build on USE_DEBUG_HELPERS OFF 2022-01-24 14:29:38 +08:00
MultiVersion.h
NamePrompter.h Explicitly default move/copy constructors 2021-12-20 17:05:08 +01:00
NaNUtils.h Upd upstream 2021-05-28 00:21:02 +03:00
NetException.h
new_delete.cpp Cleanup jemalloc contrib 2022-01-20 10:02:03 +03:00
ObjectPool.h
OpenSSLHelpers.cpp Remove cruft 2021-10-28 02:10:39 +03:00
OpenSSLHelpers.h Remove cruft 2021-10-28 02:10:39 +03:00
OpenTelemetryTraceContext.h Upd upstream 2021-05-28 00:21:02 +03:00
OptimizedRegularExpression.cpp
OptimizedRegularExpression.h Remove unbundled re2 support 2022-01-20 10:00:49 +03:00
parseAddress.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
parseAddress.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
parseGlobs.cpp
parseGlobs.h
parseRemoteDescription.cpp Updated additional cases 2021-12-20 15:55:07 +03:00
parseRemoteDescription.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
PipeFDs.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
PipeFDs.h Fix response pipe read 2020-11-27 13:12:11 +03:00
PODArray_fwd.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
PODArray.cpp Common types template instantiations 2021-02-12 00:54:50 +03:00
PODArray.h Corrections 2021-12-23 01:25:35 +03:00
PoolBase.h fixed code styles 2022-01-29 09:46:00 +08:00
PoolWithFailoverBase.h Update sort to pdqsort 2022-01-30 19:49:48 +00:00
ProcfsMetricsProvider.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
ProcfsMetricsProvider.h
ProfileEvents.cpp merge master 2022-01-01 09:01:06 +08:00
ProfileEvents.h cleanup code 2021-11-08 23:47:57 +03:00
ProfilingScopedRWLock.h
ProgressIndication.cpp Always display resource usage in client 2021-12-29 01:26:58 +03:00
ProgressIndication.h Always display resource usage in client 2021-12-29 01:20:34 +03:00
QueryProfiler.cpp Move TraceCollector into Interpreters 2022-01-10 22:35:42 +03:00
QueryProfiler.h Fix QueryProfiler (query_profiler_{cpu,real}_time_period_ns) reset 2021-12-03 01:33:08 +03:00
quoteString.cpp Non-recursive implementation for TL and its functions 2021-10-03 18:02:04 +02:00
quoteString.h Non-recursive implementation for TL and its functions 2021-10-03 18:02:04 +02:00
RadixSort.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
randomSeed.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
randomSeed.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
remapExecutable.cpp Log size of remapped memory (remap_executable) 2021-11-04 00:19:00 +03:00
remapExecutable.h Log size of remapped memory (remap_executable) 2021-11-04 00:19:00 +03:00
RemoteHostFilter.cpp Revert "Revert "Improve usability of remote_url_allow_hosts"" 2021-10-26 20:17:02 +03:00
RemoteHostFilter.h
renameat2.cpp Fix build 2021-11-25 04:18:54 +03:00
renameat2.h fix EINVAL in renameat2 on MacOS 2020-09-19 17:19:06 +03:00
RWLock.cpp Fix half of typos 2020-08-08 03:47:03 +03:00
RWLock.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
SensitiveDataMasker.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
SensitiveDataMasker.h
setThreadName.cpp Fix clang-tidy 2021-11-14 04:57:59 +03:00
setThreadName.h Remove thread_local std::string 2021-11-14 02:43:17 +03:00
SettingsChanges.cpp remove some trash 2021-09-17 22:29:10 +03:00
SettingsChanges.h remove some trash 2021-09-17 22:29:10 +03:00
SharedBlockRowRef.h Upd upstream 2021-05-28 00:21:02 +03:00
SharedLibrary.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
SharedLibrary.h Updated SharedLibrary string_view interface 2021-03-14 17:19:48 +03:00
ShellCommand.cpp Updated executable function integration tests 2021-12-28 22:55:30 +03:00
ShellCommand.h Updated tests 2021-08-30 21:41:36 +03:00
SimpleActionBlocker.h
SimpleIncrement.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
SipHash.h 128bit hash-functions accepting arbitrary list of arguments 2021-10-07 19:25:39 +08:00
SmallObjectPool.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
SpaceSaving.h Update sort to pdqsort 2022-01-30 19:49:48 +00:00
StackTrace.cpp Initial support for risc-v 2021-11-11 19:23:34 +01:00
StackTrace.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
StatusFile.cpp Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00
StatusFile.h
StatusInfo.cpp Refactored StorageDictionary 2021-04-26 13:52:41 +03:00
StatusInfo.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Stopwatch.h fix overflow in Stopwatch 2021-10-06 18:09:13 +03:00
StringSearcher.h Update StringSearcher.h 2022-01-26 13:45:26 +03:00
StudentTTest.cpp Remove idiotic whitespace 2021-08-31 02:54:11 +03:00
StudentTTest.h
SymbolIndex.cpp Update sort to pdqsort 2022-01-30 19:49:48 +00:00
SymbolIndex.h Fix parsing symbols from resources (for shared builds) 2021-12-29 09:56:59 +03:00
SystemLogBase.cpp Separate base parts out of SystemLog 2022-01-25 18:48:43 +08:00
SystemLogBase.h Separate base parts out of SystemLog 2022-01-25 18:48:43 +08:00
TaskStatsInfoGetter.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
TaskStatsInfoGetter.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
TerminalSize.cpp Use stderr instead of stdout 2021-05-05 15:52:21 +00:00
TerminalSize.h
thread_local_rng.cpp dbms/ → src/ 2020-04-03 18:14:31 +03:00
thread_local_rng.h
ThreadFuzzer.cpp Manipulate with -Wreserved-identifier only if HAS_RESERVED_IDENTIFIER has been detected 2021-10-03 17:42:36 +04:00
ThreadFuzzer.h Stop ThreadFuzzer before hung check (#29167) 2021-09-20 17:23:10 +03:00
ThreadPool.cpp Expose all GlobalThreadPool config params (#31285) 2021-11-12 16:24:47 +03:00
ThreadPool.h Expose all GlobalThreadPool config params (#31285) 2021-11-12 16:24:47 +03:00
ThreadProfileEvents.cpp Cleanup ProfileEvents and CurrentMetrics 2021-11-10 21:15:27 +03:00
ThreadProfileEvents.h Cleanup ProfileEvents and CurrentMetrics 2021-11-10 21:15:27 +03:00
ThreadStatus.cpp Use explicit template instantiation for SystemLog 2022-01-10 22:01:41 +03:00
ThreadStatus.h Do not loose ProfileEvents in case of thread destroyed before 2021-12-19 23:43:05 +03:00
Throttler.cpp HashTable constant fix 2022-01-11 18:45:41 +03:00
Throttler.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
TimerDescriptor.cpp Add TimerDescriptor::setRelative(uint64_t usec) 2021-08-25 09:42:30 +03:00
TimerDescriptor.h Add TimerDescriptor::setRelative(uint64_t usec) 2021-08-25 09:42:30 +03:00
TLDListsHolder.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
TLDListsHolder.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
TraceSender.cpp Split TraceCollector between Common and Interpreters 2022-01-11 22:30:55 +03:00
TraceSender.h Split TraceCollector between Common and Interpreters 2022-01-11 22:30:55 +03:00
typeid_cast.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
TypePromotion.h
UnicodeBar.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
UnicodeBar.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
UTF8Helpers.cpp
UTF8Helpers.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
VariableContext.h Remove redundant enumerator 2021-10-12 13:46:32 +03:00
VersionNumber.cpp Fix clang-tidy warnings in VersionNumber (use Int64 over long) 2021-06-14 10:42:50 +03:00
VersionNumber.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Visitor.h Fix strange code in TypeList 2021-11-25 23:55:02 +03:00
Volnitsky.h Issue 7334: Fixed utf8 string case-insensitive searching issue 2022-01-25 13:56:05 -05:00
WeakHash.cpp
WeakHash.h