mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
bedf208cbd
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> |
||
---|---|---|
.. | ||
tests | ||
CMakeLists.txt | ||
ColumnInfoHandler.cpp | ||
ColumnInfoHandler.h | ||
getIdentifierQuote.cpp | ||
getIdentifierQuote.h | ||
HandlerFactory.cpp | ||
HandlerFactory.h | ||
IdentifierQuoteHandler.cpp | ||
IdentifierQuoteHandler.h | ||
MainHandler.cpp | ||
MainHandler.h | ||
odbc-bridge.cpp | ||
ODBCBlockInputStream.cpp | ||
ODBCBlockInputStream.h | ||
ODBCBlockOutputStream.cpp | ||
ODBCBlockOutputStream.h | ||
ODBCBridge.cpp | ||
ODBCBridge.h | ||
ODBCConnectionFactory.h | ||
PingHandler.cpp | ||
PingHandler.h | ||
SchemaAllowedHandler.cpp | ||
SchemaAllowedHandler.h | ||
validateODBCConnectionString.cpp | ||
validateODBCConnectionString.h |