Skip to content

Commit

Permalink
[debug] Do diagnostic logging for each D-Bus signal broadcast
Browse files Browse the repository at this point in the history
When debugging order and timing of issues related to several processes
it is handy to have signals emitted by usb-moded in the journal along
with the other related logging.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Aug 17, 2017
1 parent 3420f50 commit 3350e0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/usb_moded-dbus.c
Expand Up @@ -54,7 +54,8 @@ extern gboolean rescue_mode;
*/
static void usb_moded_send_config_signal(const char *section, const char *key, const char *value)
{
log_debug(USB_MODE_CONFIG_SIGNAL_NAME ": %s %s %s\n", section, key, value);
log_debug("broadcast signal %s(%s, %s, %s)\n", USB_MODE_CONFIG_SIGNAL_NAME, section, key, value);

if( !have_service_name )
{
log_err("config notification without service: [%s] %s=%s",
Expand Down Expand Up @@ -603,6 +604,8 @@ static int usb_moded_dbus_signal(const char *signal_type, const char *content)
int result = 1;
DBusMessage* msg = 0;

log_debug("broadcast signal %s(%s)\n", signal_type, content);

if( !have_service_name )
{
log_err("sending signal without service: %s(%s)",
Expand Down

0 comments on commit 3350e0b

Please sign in to comment.