diff --git a/src/MeoAssistant/Assistant.cpp b/src/MeoAssistant/Assistant.cpp index 0579e87ee7..65dfa9c0a8 100644 --- a/src/MeoAssistant/Assistant.cpp +++ b/src/MeoAssistant/Assistant.cpp @@ -511,8 +511,6 @@ void Assistant::working_proc() std::unique_lock lock(m_mutex); if (!m_thread_idle && !m_tasks_queue.empty()) { - auto start_time = std::chrono::steady_clock::now(); - auto task_ptr = m_tasks_queue.front(); m_tasks_queue.pop(); diff --git a/src/MeoAssistant/Logger.hpp b/src/MeoAssistant/Logger.hpp index e1bc83cd63..95697ac18a 100644 --- a/src/MeoAssistant/Logger.hpp +++ b/src/MeoAssistant/Logger.hpp @@ -201,8 +201,12 @@ namespace asst std::chrono::time_point m_start_time; }; - //static auto& log = Logger::get_instance(); +#define _Cat_(a, b) a ## b +#define _Cat(a, b) _Cat_(a, b) +#define _CatVarNameWithLine(Var) _Cat(Var, __LINE__) + #define Log Logger::get_instance() -#define LogTraceFunction LoggerAux _func_aux(__FUNCTION__) -#define LogTraceScope LoggerAux _func_aux +#define LogTraceScope LoggerAux _CatVarNameWithLine(_func_aux_) +#define LogTraceFunction LogTraceScope(__FUNCTION__) +#define LogTraceFunctionWithArgs // how to do this?, like LogTraceScope(__FUNCTION__, __FUNCTION_ALL_ARGS__) }