aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-05-09 13:27:43 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-05-09 13:27:43 +0900
commitb91b6bca83935db2db949b683bbe584c05c477b6 (patch)
tree451cdefff3d3d4f9346a15869b8023a341d5eab5
parent4cc133ac28ec6045b8c4697ce8e1ab9f8c85bbf6 (diff)
downloadlibquotient-b91b6bca83935db2db949b683bbe584c05c477b6.tar.gz
libquotient-b91b6bca83935db2db949b683bbe584c05c477b6.zip
README.md: Described how to use Qt logging categories
-rw-r--r--README.md19
1 files changed, 17 insertions, 2 deletions
diff --git a/README.md b/README.md
index 220af65a..b2536797 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ Issues should be submitted to [the project's issue tracker](https://github.com/F
## Installing pre-requisites
### Linux
-Just install things from "Pre-requisites" using your preferred package manager. If your Qt package base is fine-grained you might want to take a look at CMakeLists.txt to figure out which specific libraries libqmatrixclient uses (or blindly run cmake and look at error messages).
+Just install things from "Pre-requisites" using your preferred package manager. If your Qt package base is fine-grained you might want to take a look at `CMakeLists.txt` to figure out which specific libraries libqmatrixclient uses (or blindly run cmake and look at error messages).
### OS X
`brew install qt5` should get you Qt5. You may need to tell CMake about the path to Qt by passing `-DCMAKE_PREFIX_PATH=<where-Qt-installed>`
@@ -41,6 +41,7 @@ cmake .. # Pass -DCMAKE_PREFIX_PATH and -DCMAKE_INSTALL_PREFIX here if needed
cmake --build . --target all
```
This will get you the compiled library in `build_dir` inside your project sources. Only static builds of libqmatrixclient are tested at the moment; experiments with dynamic builds are welcome. The two known projects to link with libqmatrixclient are Tensor and Quaternion; you should take a look at their source code before doing anything with libqmatrixclient on your own.
+
## Troubleshooting
If `cmake` fails with...
@@ -50,4 +51,18 @@ CMake Warning at CMakeLists.txt:11 (find_package):
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.
```
-...then you need to set the right -DCMAKE_PREFIX_PATH variable, see above.
+...then you need to set the right `-DCMAKE_PREFIX_PATH` variable, see above.
+
+libqmatrixclient uses Qt's logging categories to make switching certain types of logging easier. In case of troubles at runtime (bugs, crashes) you can increase logging if you add the following to the `QT_LOGGING_RULES` environment variable:
+```
+libqmatrixclient.<category>.<level>=<flag>
+```
+where
+- `<category>` is something like `main`, `jobs`, or `events` (the full list is in the file `debug.cpp`)
+- `<level>` is one of `debug` and `warning`
+- `<flag>` is either `true` or `false`.
+
+`*` can be used as a wildcard for any part between two dots, and comma is used for a separator. Latter statements override former ones, so if you want to switch on all debug logs except `jobs` you can set
+```
+QT_LOGGING_RULES="libqmatrixclient.*.debug=true,libqmatrixclient.jobs.debug=false"
+``` \ No newline at end of file