WorstCodeWay
WorstCodeWay
> This change comes from #2752. The comment has been changed because spdlog is not responsible for Qt lifetime management. Thank you @tt4g . Seems no solution... Can I leave...
> hlog_disable I tried something very likely by calling `log_set_level(LOG_LEVEL_SILENT)`, but that doesn't work. I don't know if it is caused by the multiple instances of `http_server_t` and `hv::TcpServer`? Besides,...
> You should call hlog_disable before first log print, such as main() entrance. Oh, yes! That works. Thanks.
Hi, sorry for re-opening this thread. I find new problems here. There are hv logs named `libhv.20230814.log` even though I have called `hlog_disable();` or `hlog_set_level(LOG_LEVEL_SILENT);` at the very beginning within...
> Test like this: > > ``` > #include "hv/hlog.h" > > int main() { > hlogi("before"); > hlog_disable(); > hlogi("after"); > return 0; > } > ``` @ithewei Sorry...
@ithewei Ok, now I can make some conclusions. But we begin from these codes where logs sneaked from: ``` void loop_thread(const Functor& pre, const Functor& post) { hlogi("EventLoopThread started, tid=%ld",...
@ithewei > No bug! Do you use other libraries in your application, is it possible that you use other libraries, which encapsulate libhv, and call hlog_set_level? Not really. My third-party...
@ithewei > Another way is to set the handler to change the log output mode,like this: > > ``` > void custom_log_handler(int loglevel, const char* buf, int len) { >...
And new found! Every time there is a new `TcpClient`, I should add `hlog_disable` at beginning of `onConnection` callback to prevent logs.
> > @ithewei > > > Another way is to set the handler to change the log output mode,like this: > > > ``` > > > void custom_log_handler(int loglevel,...