Logger: simple, convinient and thread safe logger for Qt applications
-
Ok, thank you for notification. Currently there is only one project maintainer and I don't have much time for now to implement and support the Qt 5.0.0 compatibility of the project.
Taking a quick look through the Qt 5 beta2 headers I've noticed there is a lot of work to be done refactoring the Logger to take advantage of the extended Qt 5 logging abilities. If anyone is willing to implement Qt 5 compatibility and post it as a merge request on Gitorious the contribution will be kindly accepted :)
-
Pushed "e3c2745":https://gitorious.org/cutelogger/cutelogger/commit/e3c2745c6c5f38896f87472e01ea2caf2d9e211b. Now Logger successfully builds with Qt 5 and uses some of its advanced logging feature (e.g. file/line/function name gathered in renewed qDebug and the same macros).
Still some work to be done to support "log categories":https://codereview.qt-project.org/#change,13226 and new Qt log formatting feature in a ConsoleAppender.
-
@cyberbobs said:
Hello
Hello! How do I connect this component to my program, it is necessary to compile? I can not find a solution.
I copied files but there were errors.
android/log.h: No such file or directory
#include <android/log.h>windows.h: No such file or directory
#include <windows.h>My system Ubuntu 14.04
-
@Alexorleon Replied to your question on Github. Basically, you don't need to include windows-specific or console appenders to Android project, it is already handled in pro file included in the library sources. Also, it is suggested that you will include CuteLogger sources to your project (if you store project in git repository, you can add it as submodule) and build it alongside your project instead of building it separately and adding the prebuild libraries.
-
Hey, thanks for this library, it's really cool.
I'd like to know if it was possible and safe to write in several files? I'd like to create several FileAppender's and decide in which of these files I should write.
Is there any way to indicate to LOG_INFO() the FileAppender I want to write in?
-
Use syslog, it's simple, convenient and thread safe, and has powerful tools to work with (e.g., syslog-ng server). Don't reinvent the wheel!
-
@Gregoire-Borel Actually, the categorized logging feature is made just for that case. Please, take a look at Logger::registerCategoryAppender(). After adding the appender for the category (which is basically just a string identifier) you may use LOG_C* macros to write records to the specific categories or make use of LOG_CATEGORY macro (I'm pretty fond of it myself :), allowing you to automatically redirect every log record made from inside some class to the category you picked.
-
@_JR_ You're welcome :) Personally I neither had any experience in writing iOS apps nor have the necessary hardware/keys/certificates for that. So any input on the subject will be useful (but I doubt that it will be possible to make any enhancements based on that).