Skip to content

sunbuny/qloguru

 
 

Repository files navigation

QLoguru (A loguru-derived version based on QSpdlog)

QSpdLog

GitHub Workflow Status Coverage

This repository contains the source code of a library, which provides a Qt widget for displaying log messages coming from the loguru library.

Features

  • Display log messages in a tree view
  • Display an icon for each log level
  • Separate message structure from message content
  • Search in messages
    • via regular expressions
    • use match case option
    • reuse search history
  • Auto scrolling feature with various options
    • disabled
    • scroll to the bottom when a new message is added
    • scroll to the bottom when a new message is added unless the user scrolled up
  • many more to come
  • request or suggest new ones

Usage

In its initial implementation only CMake tool is considered. To use the library in your project, you have:

  1. Add the library as a submodule (or any kind of folder in your machine)

    git submodule add https://github.com/sunbuny/qloguru.git
  2. Add the library to your CMake project

    add_subdirectory(qloguru)
  3. Add the library to your target

    target_link_libraries(${PROJECT_NAME} qloguru::lib)
  4. Include the interface header into the source file where you want to instantiate the widget

    #include <qloguru/qloguru.h>
  5. Instantiate the widget, register loggers and show the widget

    QLoguruWidget* widget = new QLoguruWidget();
    
    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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • loguru for the logging library
  • Qt for the GUI framework

About

A simple Qt based widget for visualizing loguru output.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 92.4%
  • Shell 4.1%
  • CMake 3.5%