We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

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

Sailfish OS logging and debugging

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

Applications

Example from osmscout

Android support

How to help debug android support

Bluetooth

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

Sailfish OS logging and debugging

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

Applications

Example from osmscout

Android support

How to help debug android support

Bluetooth

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

Sailfish OS logging and debugging

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

Applications

Android support

How to help debug android support

Bluetooth

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

Sailfish OS logging and debugging

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

Applications

Android support

How to help debug android support

Bluetooth

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

##Sensors##

Stop the daemon and start it in debugging mode

systemctl stop sensorfwd
sensorfwd -l=debug

##PulseAudio##

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/arm_droid_default.pa"

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

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

Sailfish OS logging and debugging

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

Applications

Android support

How to help debug android support

Bluetooth

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

##Sensors##

Stop the daemon and start it in debugging mode

systemctl stop sensorfwd
sensorfwd -l=debug

##PulseAudio##

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/arm_droid_default.pa"

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

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

Sailfish OS logging and debugging

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

Applications

Android support

How to help debug android support

Bluetooth

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

##Sensors##

Stop the daemon and start it in debugging mode

systemctl stop sensorfwd
sensorfwd -l=debug

##PulseAudio##

PulseAudio

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/arm_droid_default.pa"

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

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

Sailfish OS logging and debugging

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

Applications

Android support

How to help debug android support

Bluetooth

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

##Sensors##

Stop the daemon and start it in debugging mode

systemctl stop sensorfwd
sensorfwd -l=debug

PulseAudio

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/arm_droid_default.pa"

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

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

Sailfish OS logging and debugging

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

Applications

Android support

How to help debug android support

Bluetooth

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

##Sensors##

Sensors

Stop the daemon and start it in debugging mode

systemctl stop sensorfwd
sensorfwd -l=debug

PulseAudio

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/arm_droid_default.pa"

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

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

Sailfish OS logging and debugging

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

Applications

Android support

How to help debug android support

Bluetooth

SystemD Services

There 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.

msyncd

Source: CalDAV and CardDAV Community Contributions

vi /etc/sysconfig/msyncd

QTCONTACTS_SQLITE_TWCSA_TRACE=1
QTCONTACTS_SQLITE_TRACE=1
MSYNCD_LOGGING_LEVEL=8


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

[Service]
# -G (--global-syms) so that msyncd's plugins can find symbols in msyncd and
#     in the libraries msyncd is org.bluez.DebugLog linked to.
EnvironmentFile=/etc/sysconfig/msyncd
ExecStart=/usr/bin/invoker -G -o -s --type=qt5 /usr/bin/msyncd
Restart=always

Reload daemon

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

or reload the 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

Sensors

Stop the daemon and start it in debugging mode

[root@Sailfish nemo]# systemctl stop sensorfwd
sensorfwd -l=debug

--user restart msyncd

PulseAudio

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/arm_droid_default.pa"

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

[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

[Service]
Type=notify
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

Bluetooth

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

Sailfish OS logging and debugging

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

List all journalctl and tail

journalctl -alef -n all --full

Applications

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.

msyncd

Source: CalDAV and CardDAV Community Contributions

vi /etc/sysconfig/msyncd

QTCONTACTS_SQLITE_TWCSA_TRACE=1
QTCONTACTS_SQLITE_TRACE=1
MSYNCD_LOGGING_LEVEL=8


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

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

Reload daemon

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

or reload the service

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

PulseAudio

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/arm_droid_default.pa"

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

[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

[Service]
Type=notify
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

Bluetooth

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

Sailfish OS logging and debugging

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

List all journalctl and tail

journalctl -alef -n all --full

Applications

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.

connman

This is the connection manager (agent)

To debug you install connectionagent-qt5-tracing

You can disable the debugging by commenting out the setting in

/var/lib/environment/nemo/70-connectionagent-tracing.conf

#CONNECTIONAGENT_TRACING=-d

msyncd

Source: CalDAV and CardDAV Community Contributions

vi /etc/sysconfig/msyncd

QTCONTACTS_SQLITE_TWCSA_TRACE=1
QTCONTACTS_SQLITE_TRACE=1
MSYNCD_LOGGING_LEVEL=8


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

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

Reload daemon

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

or reload the service

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

PulseAudio

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/arm_droid_default.pa"

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

[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

[Service]
Type=notify
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

Bluetooth

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

Sailfish OS logging and debugging

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

List all journalctl and tail

journalctl -alef -n all --full

Applications

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.

connman

This is the connection manager (agent)

To debug you install connectionagent-qt5-tracing

You can disable the debugging by commenting out the setting in

/var/lib/environment/nemo/70-connectionagent-tracing.conf

#CONNECTIONAGENT_TRACING=-d

msyncd

Source: CalDAV and CardDAV Community Contributions

vi /etc/sysconfig/msyncd

QTCONTACTS_SQLITE_TWCSA_TRACE=1
QTCONTACTS_SQLITE_TRACE=1
MSYNCD_LOGGING_LEVEL=8


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

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

Reload daemon

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

or reload the service

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

PulseAudio

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/arm_droid_default.pa"

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

[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

[Service]
Type=notify
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

Bluetooth

You want to run bluetooth with some debugging option. You can install the bluez5-tracing pacakge

in /lib/systemd/system/bluetooth.service add a line in the [Service] section

EnvironmentFile=/etc/tracing/bluez/bluez.tracing

In the tracing file you find

TRACING=-d MGMT_DEBUG=1

There is also 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

Sailfish OS logging and debugging

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

List all journalctl and tail

journalctl -alef -n all --full

Applications

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.

connman

This is the connection manager (agent)

To debug you install connectionagent-qt5-tracing

You can disable the debugging by commenting out the setting in

/var/lib/environment/nemo/70-connectionagent-tracing.conf

#CONNECTIONAGENT_TRACING=-d

msyncd

Source: CalDAV and CardDAV Community Contributions

vi /etc/sysconfig/msyncd

QTCONTACTS_SQLITE_TWCSA_TRACE=1
QTCONTACTS_SQLITE_TRACE=1
MSYNCD_LOGGING_LEVEL=8


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

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

Reload daemon

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

or reload the service

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

PulseAudio

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/arm_droid_default.pa"

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

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

Sailfish EAS (ActiveSync)

https://together.jolla.com/question/146982/bug-sailfish-eas-stuck-at-100-cpu-useage/

[root@Sailfish nemo]# vi /home/nemo/.config/eas-sailfish.conf

[logging]
Sailfish.eas.debug=dwc
Sailfish.eas.warning=dwc
Sailfish.eas.error=dwc
Sailfish.easwbxml=dwc
Sailfish.easnetwork=dwc
Sailfish.easverbose=dwc

On Sailfish OS version 3.0.2 and newer (source):

[logging]
Sailfish.eas=d
Sailfish.easnetwork=d
Sailfish.easwbxml=d
Sailfish.logfile=/home/nemo/eas.log

Sensors sensorfwd

Edit the service file

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

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

[Service]
Type=notify
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

Bluetooth

You want to run bluetooth with some debugging option. You can install the bluez5-tracing pacakge

in /lib/systemd/system/bluetooth.service add a line in the [Service] section

EnvironmentFile=/etc/tracing/bluez/bluez.tracing

In the tracing file you find

TRACING=-d MGMT_DEBUG=1

There is also 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