Ismael Luceno
628ff65828
logging: Add proper backtrace support detection
...
The Q_OS_UNIX macro is inappropriate because many UNIX-like platforms may
lack backtrace support in the libc. E.g.: Darwin / Mac OS X, Musl libc,
OpenBSD, OpenIndiana.
2021-08-31 11:15:55 +01:00
Jim Broadus
9a337a9efc
logging: Fix {anonymous} class name.
...
If the __PRETTY_FUNCTION__ macro yields {anonymous} as the class name,
use the method name as the tag.
2021-05-03 14:44:19 +01:00
Jim Broadus
429d8ee0f9
core/logging: Fix QString::split deprecation
...
QString::SplitBehavior is deprecated in 5.14. Use Qt::SplitBehavior
after this version.
2021-04-19 10:25:31 +01:00
John Maguire
341dc7326f
Reformat all C++
2020-09-22 14:56:06 +01:00
Jim Broadus
902522f4d3
Fix Qt generated log messages.
...
To avoid infinite recursion, Qt prevents a log generated from an installed
message handler from being handled by that same handler. So when a Qt message
is handled, the logging magic (__logging_message__) that is added by
CreateLogger, and is expected to be detected and stripped by the handler, is
instead dumped to the log.
Instead of sending the Qt messages back through the logging system, use a new
BufferedDebug to build the log message in a buffer, then immeiately print the
buffer to stderr.
2020-03-07 02:41:56 +00:00
Jim Broadus
09723d516c
Use a template for CreateLogger to allow different QDebug derivatives.
2020-03-07 02:41:56 +00:00
Jim Broadus
79ac16afeb
Move unneeded declarations and macros from logging header.
...
Some functions and macros aren't used outside of logging.cpp and don't need be
declared in header. Functions can be static.
2020-03-06 11:09:20 +00:00
Jim Broadus
52fd6ffadc
Add a logging category to log all network requests.
...
New logging class NetworkRequests disabled by default, but can be enabled with
the command line option.
2020-02-13 11:09:51 +00:00
Jim Broadus
d45a9f5c53
Enable debug logging for GstEnginePipeline by default.
...
Use qLogCat to put verbose GStreamer callback messages into a new
GstEnginePipelineCallbacks category. Filter that category instead of
the entire class by default.
2020-01-31 10:24:53 +00:00
Jim Broadus
4b37e0c577
Use qLogCat for GLog handler.
...
Provide the domain string from the GLog callback as the category.
2020-01-30 11:20:03 -08:00
Jim Broadus
a2d2850884
Add a new qLogCat macro to specify category.
...
In some cases, such as message handling callback functions, the line and function
macros don't provide a lot of useful information. In other cases, we may want more
granularity of control withing a class. For these cases, add a qLogCat that takes
a category string. Print this string in the message and use it as the filter
category.
2020-01-30 11:19:58 -08:00
Jim Broadus
203d6425fd
Fix nomenclature in logging functions.
...
The qLog macro passes the result of the __PRETTY_FUNCTION__ macro to the
CreateLogger* functions, but these all take an argument called class_name.
2020-01-30 08:50:06 -08:00
Chocobozzz
e6e189967d
Merge remote-tracking branch 'upstream/master' into qt5
2016-02-29 18:03:02 +01:00
John Maguire
f2daa772c1
Lazy initialise everything in Application.
2016-02-11 15:15:38 +00:00
Chocobozzz
631a6cdabd
Merge branch 'master' into qt5
2015-09-16 17:40:54 +02:00
John Maguire
b2a532be62
Experiment with typesafe time units
2015-07-20 14:35:13 +01:00
Chocobozzz
149e870ab4
Fix log messages (lines and classname)
2015-06-16 19:58:36 +02:00
Chocobozzz
98a450ad77
Fix compilation error (logging macros)
2015-06-13 20:51:18 +02:00
Chocobozzz
7bfe32c7df
Avoid warning message when the level exceeds the threshold
2015-04-16 23:22:53 +02:00
Chocobozzz
8b226c2171
Update non optionnals sources to qt5
2015-04-11 23:24:07 +02:00
John Maguire
3323c2d094
Convert all instances of foreach() to a C++11 for
...
find ext src -name '*.cpp' -exec \
sed -i -e 's/foreach(\([^,]\+\),/for (\1 :/' {} \;
2014-02-10 14:43:32 +01:00
John Maguire
bebd781fdf
Reformat all non-3rd-party C/C++/Objective-C++.
...
Command line:
find src ext -regex '.*\.\(h\|cpp\|mm\)' -exec clang-format -i
-style='{BasedOnStyle: Google, DerivePointerBinding: false}' {} \;
2014-02-07 16:34:20 +01:00
John Maguire
71893e4847
Use nullptr instead of NULL everywhere.
2014-02-06 17:29:59 +01:00
David Sansome
f0b9120c43
Create a Fatal logging level, and use it when sqlite symbols can't be resolved.
2013-09-18 00:15:46 +10:00
John Maguire
5280ddf3d7
Add support for demangling symbols on Linux.
2012-02-02 15:50:42 +01:00
John Maguire
0212a1fa91
D'oh
2012-01-17 21:29:20 -08:00
John Maguire
4f6ee57297
Apparently <execinfo.h> doesn't exist for mingw.
2012-01-17 20:57:56 -08:00
John Maguire
ab58c72c66
ifdef DumpStackTrace() for non-Unix.
2012-01-17 20:45:33 -08:00
John Maguire
5fe7d1ad20
Add stack trace dumper (might need some tweaks for win & Linux still).
2012-01-17 20:35:10 -08:00
David Sansome
9041117867
Move everything around in the source tree - static libraries and external binaries now go in "ext/". Add a generic worker pool.
2012-01-05 23:25:13 +00:00