ClickHouse/programs/odbc-bridge
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
..
tests
CMakeLists.txt Remove unbundled odbc support 2022-01-20 10:01:59 +03:00
ColumnInfoHandler.cpp Use fmt::runtime() for LOG_* for non constexpr 2022-02-01 14:30:03 +03:00
ColumnInfoHandler.h Fix w/o ODBC build 2022-01-20 10:02:02 +03:00
getIdentifierQuote.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
getIdentifierQuote.h Fix w/o ODBC build 2022-01-20 10:02:02 +03:00
HandlerFactory.cpp Fix w/o ODBC build 2022-01-20 10:02:02 +03:00
HandlerFactory.h
IdentifierQuoteHandler.cpp Use fmt::runtime() for LOG_* for non constexpr 2022-02-01 14:30:03 +03:00
IdentifierQuoteHandler.h Fix w/o ODBC build 2022-01-20 10:02:02 +03:00
MainHandler.cpp Use fmt::runtime() for LOG_* for non constexpr 2022-02-01 14:30:03 +03:00
MainHandler.h
odbc-bridge.cpp
ODBCBlockInputStream.cpp Fix tests 2021-11-22 15:21:15 +03:00
ODBCBlockInputStream.h Remove streams from formats. 2021-10-11 19:11:50 +03:00
ODBCBlockOutputStream.cpp Remove unused code 2021-12-24 15:37:40 +03:00
ODBCBlockOutputStream.h Remove streams from formats. 2021-10-11 19:11:50 +03:00
ODBCBridge.cpp
ODBCBridge.h
ODBCConnectionFactory.h Try ping connection on unexpected errors 2022-01-05 16:26:28 +00:00
PingHandler.cpp
PingHandler.h
SchemaAllowedHandler.cpp Use fmt::runtime() for LOG_* for non constexpr 2022-02-01 14:30:03 +03:00
SchemaAllowedHandler.h Fix w/o ODBC build 2022-01-20 10:02:02 +03:00
validateODBCConnectionString.cpp Rename "common" to "base" 2021-10-02 10:13:14 +03:00
validateODBCConnectionString.h