diff options
author | Saturneric <[email protected]> | 2023-02-03 13:43:55 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2023-02-03 13:43:55 +0000 |
commit | 11d32517c2f6f538209c893c6b0b24572fba1a36 (patch) | |
tree | 0dac14bcad75d9c7c5b5723dc23e6409721966b4 /src/core/thread/Task.h | |
parent | feat: change logging framework to spdlog (diff) | |
download | GpgFrontend-11d32517c2f6f538209c893c6b0b24572fba1a36.tar.gz GpgFrontend-11d32517c2f6f538209c893c6b0b24572fba1a36.zip |
feat: change the log style in source files
Diffstat (limited to 'src/core/thread/Task.h')
-rw-r--r-- | src/core/thread/Task.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/thread/Task.h b/src/core/thread/Task.h index 163e1507..413a54fd 100644 --- a/src/core/thread/Task.h +++ b/src/core/thread/Task.h @@ -78,7 +78,7 @@ class GPGFRONTEND_CORE_EXPORT Task : public QObject, public QRunnable { */ template <typename T> void AppendObject(T &&obj) { - DLOG(TRACE) << "called:" << this; + SPDLOG_TRACE("called: {}", static_cast<void *>(this)); auto *obj_dstr = this->get_heap_ptr(sizeof(T)); new ((void *)obj_dstr->p_obj) T(std::forward<T>(obj)); @@ -102,11 +102,11 @@ class GPGFRONTEND_CORE_EXPORT Task : public QObject, public QRunnable { */ template <typename T> void AppendObject(T *obj) { - DLOG(TRACE) << "called:" << this; + SPDLOG_TRACE("called: {}", static_cast<void *>(this)); auto *obj_dstr = this->get_heap_ptr(sizeof(T)); auto *ptr_heap = new ((void *)obj_dstr->p_obj) T(std::move(*obj)); if (std::is_class_v<T>) { - LOG(TRACE) << "is class"; + SPDLOG_TRACE("is class"); auto destructor = [](const void *x) { static_cast<const T *>(x)->~T(); }; @@ -125,7 +125,7 @@ class GPGFRONTEND_CORE_EXPORT Task : public QObject, public QRunnable { */ template <typename T> T PopObject() { - DLOG(TRACE) << "called:" << this; + SPDLOG_TRACE("called: {}", static_cast<void *>(this)); if (data_objects_.empty()) throw std::runtime_error("No object to pop"); auto *obj_dstr = data_objects_.top(); auto *heap_ptr = (T *)obj_dstr->p_obj; |