ClickHouse/base/daemon
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
..
BaseDaemon.cpp Use fmt::runtime() for LOG_* for non constexpr 2022-02-01 14:30:03 +03:00
BaseDaemon.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
CMakeLists.txt Remove MAKE_STATIC_LIBRARIES (in favor of USE_STATIC_LIBRARIES) 2022-01-24 17:28:33 +03:00
GraphiteWriter.cpp Get rid of 10-years old trash 2021-11-21 15:48:11 +03:00
GraphiteWriter.h Get rid of 10-years old trash 2021-11-21 15:48:11 +03:00
SentryWriter.cpp Remove cruft 2021-10-28 02:10:39 +03:00
SentryWriter.h Crash log: development 2020-07-31 23:16:31 +03:00