Sailfish OS logging and debugging

asked 2019-06-05 10:34:33 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2019-06-21 01:24:11 +0300

deloptes gravatar image

This is not just a question, but a desire to have a howto on debugging.

I want to put together everything related to logging and debugging in Sailfish OS. After 1/2day looking around I found out there are just generic infos how it works or it might work and infos scattered all over.

Please feel free to update or link with sources.

Some good ideas from the cheat sheet

Qt5 for developers

System log

Sailfish OS uses systemds journal facility

More detailed and persistent logs


Android support

How to help debug android support

SystemD Services

Source: How to set environment variable in systemd service?

For systemd services create configuration file and add EnvironmentFile pointing to the file in the service configuration as shown below.


Source: CalDAV and CardDAV Community Contributions

vi /etc/sysconfig/msyncd


vi /usr/lib/systemd/user/msyncd.service

# -G (--global-syms) so that msyncd's plugins can find symbols in msyncd and
#     in the libraries msyncd is linked to.
ExecStart=/usr/bin/invoker -G -o -s --type=qt5 /usr/bin/msyncd

Reload daemon

[root@Sailfish nemo]# systemctl --user daemon-reload

or reload the service

[root@Sailfish nemo]# systemctl --user restart msyncd


A lot of information here

Edit file /etc/sysconfig/pulseaudio and add option for verbosity or debugging (log-level)

[root@Sailfish nemo]# vi /etc/sysconfig/pulseaudio

 CONFIG="-vvv -n --file=/etc/pulse/"

Restart PA (Note: restart does not work [X])

[root@Sailfish nemo]# systemctl --user stop pulseaudio
[root@Sailfish nemo]# systemctl --user start pulseaudio

Sensors sensorfwd

Edit the service file

[root@Sailfish nemo]# vi /lib/systemd/system/sensorfwd.service

and replace --log-level=warning with --log-level=debug

ExecStart=/usr/sbin/sensorfwd -c=/etc/sensorfw/primaryuse.conf --systemd --log-level=debug --no-magnetometer-bg-calibration

Alternatively stop the daemon and start it in debugging mode

systemctl stop sensorfwd
sensorfwd -l=debug


There is org.bluez.DebugLog service

List all options dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.List

Enable what you are interested in. Here some examples:

dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:plugins/sailfish-exclude.c
dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:src/sdpd-service.c
dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:src/service.c
dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:src/profile.c
dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:profiles/audio/a2dp.c
dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:src/advertising.c
dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:src/device.c
dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:src/main.c
dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:src/plugin.c
dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:profiles/deviceinfo/deviceinfo.c
dbus-send --system --print-reply --dest=org.bluez / org.bluez.DebugLog.Enable string:profiles/deviceinfo/dis.c
edit retag flag offensive close delete



converted to wiki

@deloptes is author of this

coderus ( 2019-06-05 12:47:59 +0300 )edit