This repository contains the source code of a library, which provides a Qt widget for displaying log messages coming from the spdlog library.
In its initial implementation only CMake tool is considered. To use the library in your project, you have:
Add the library as a submodule (or any kind of folder in your machine)
git submodule add https://github.com/arsdever/qspdlog.git
Add the library to your CMake project
add_subdirectory(qspdlog)
Add the library to your target
target_link_libraries(${PROJECT_NAME} qspdlog::lib)
Include the interface header into the source file where you want to instantiate the widget
#include <qspdlog/qspdlog.h>
Instantiate the widget, register loggers and show the widget
QSpdLogWidget* widget = new QSpdLogWidget();
auto sink = widget->sink();
// register the sink to whatever logger you want
widget->show();
A complete example can be found in the sample folder.
Note: In the sample it's considered that you already added the library as a submodule.
This project is licensed under the MIT License - see the LICENSE file for details.