commit 5fadba14ac849de1d008c691d4bcf11172b53f1c
parent fc491788a8d348d810ee2dcbdaadf5cdc3962b5f
Author: wwp <subscript@free.fr>
Date: Sat, 22 Mar 2025 18:13:36 +0100
RSSyl plugin: allow enhanced debug msg filtering by making sure all plugin debug messages are prefixed with 'RSSyl:'.
Diffstat:
9 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/plugins/rssyl/opml_export.c b/src/plugins/rssyl/opml_export.c
@@ -107,7 +107,7 @@ static void rssyl_opml_export_func(FolderItem *item, gpointer data)
log_warning(LOG_PROTOCOL,
_("RSSyl: Error while writing '%s' to feed export list.\n"),
item->name);
- debug_print("Error while writing '%s' to feed_export list.\n",
+ debug_print("RSSyl: Error while writing '%s' to feed_export list.\n",
item->name);
}
}
diff --git a/src/plugins/rssyl/opml_import.c b/src/plugins/rssyl/opml_import.c
@@ -54,18 +54,18 @@ void rssyl_opml_import_func(gchar *title, gchar *url, gint depth, gpointer data)
gboolean nulltitle = FALSE;
gint i = 1;
- debug_print("depth %d, ctx->depth %d\n", depth, ctx->depth);
+ debug_print("RSSyl: depth %d, ctx->depth %d\n", depth, ctx->depth);
while (depth < ctx->depth) {
/* We've gone up at least one level, need to find correct parent */
ctx->current = g_slist_delete_link(ctx->current, ctx->current);
ctx->depth--;
}
- debug_print("OPML_IMPORT: %s %s (%s)\n",
+ debug_print("RSSyl: OPML_IMPORT: %s %s (%s)\n",
(url != NULL ? "feed": "folder"), title, url);
if( title == NULL ) {
- debug_print("NULL title received, substituting a placeholder title\n");
+ debug_print("RSSyl: NULL title received, substituting a placeholder title\n");
title = g_strdup(_("Untitled"));
nulltitle = TRUE;
}
diff --git a/src/plugins/rssyl/parse822.c b/src/plugins/rssyl/parse822.c
@@ -270,7 +270,7 @@ static void rssyl_folder_read_existing_real(RFolderItem *ritem)
ritem->last_update = 0;
if( (dp = g_dir_open(path, 0, &error)) == NULL ) {
- debug_print("g_dir_open on \"%s\" failed with error %d (%s)\n",
+ debug_print("RSSyl: g_dir_open on \"%s\" failed with error %d (%s)\n",
path, error->code, error->message);
g_error_free(error);
g_free(path);
diff --git a/src/plugins/rssyl/rssyl.c b/src/plugins/rssyl/rssyl.c
@@ -211,13 +211,13 @@ static void rssyl_get_last_num(Folder *folder, FolderItem *item)
g_return_if_fail(item != NULL);
- debug_print("rssyl_get_last_num(): Scanning %s ...\n", item->path);
+ debug_print("RSSyl: rssyl_get_last_num(): Scanning %s ...\n", item->path);
path = folder_item_get_path(item);
g_return_if_fail(path != NULL);
if( (dp = g_dir_open(path, 0, &error)) == NULL ) {
FILE_OP_ERROR(item->path, "g_dir_open");
- debug_print("g_dir_open() failed on \"%s\", error %d (%s).\n",
+ debug_print("RSSyl: g_dir_open() failed on \"%s\", error %d (%s).\n",
path, error->code, error->message);
g_error_free(error);
g_free(path);
@@ -235,7 +235,7 @@ static void rssyl_get_last_num(Folder *folder, FolderItem *item)
}
g_dir_close(dp);
- debug_print("Last number in dir %s = %d\n", item->path, max);
+ debug_print("RSSyl: Last number in dir %s = %d\n", item->path, max);
item->last_num = max;
}
@@ -687,7 +687,7 @@ static gint rssyl_get_num_list(Folder *folder, FolderItem *item,
g_return_val_if_fail(path != NULL, -1);
if( (dp = g_dir_open(path, 0, &error)) == NULL ) {
- debug_print("g_dir_open() failed on \"%s\", error %d (%s).\n",
+ debug_print("RSSyl: g_dir_open() failed on \"%s\", error %d (%s).\n",
path, error->code, error->message);
g_error_free(error);
g_free(path);
diff --git a/src/plugins/rssyl/rssyl_add_item.c b/src/plugins/rssyl/rssyl_add_item.c
@@ -204,8 +204,8 @@ static gint rssyl_feed_item_changed(FeedItem *new_item, FeedItem *old_item )
if( old_item->text && new_item->text ) {
if( strcmp(old_item->text, new_item->text) ) { /* ... compare them */
debug_print("RSSyl:\t\titem texts differ\n");
- debug_print("\nOLD: '%s'\n", old_item->text);
- debug_print("\nNEW: '%s'\n", new_item->text);
+ debug_print("\nRSSyl: OLD: '%s'\n", old_item->text);
+ debug_print("\nRSSyl: NEW: '%s'\n", new_item->text);
return ITEM_CHANGED_TEXTONLY;
}
diff --git a/src/plugins/rssyl/rssyl_cb_menu.c b/src/plugins/rssyl/rssyl_cb_menu.c
@@ -78,7 +78,7 @@ void rssyl_new_feed_cb(GtkAction *action,
if (uri) {
gchar* newstr = g_uri_to_string(uri);
- debug_print("URI: '%s' -> '%s'\n", str, newstr ? newstr : "N/A");
+ debug_print("RSSyl: URI: '%s' -> '%s'\n", str, newstr ? newstr : "N/A");
if (newstr)
g_free(newstr);
g_uri_unref(uri);
diff --git a/src/plugins/rssyl/rssyl_feed_props.c b/src/plugins/rssyl/rssyl_feed_props.c
@@ -73,7 +73,7 @@ static void rssyl_gtk_prop_store(RFolderItem *ritem)
use_default_ri = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(ritem->feedprop->default_refresh_interval));
ritem->default_refresh_interval = use_default_ri;
- debug_print("store: default refresh interval is %s\n",
+ debug_print("RSSyl: store: default refresh interval is %s\n",
( use_default_ri ? "ON" : "OFF" ) );
/* Use default if checkbutton is set */
@@ -129,7 +129,7 @@ static void rssyl_gtk_prop_store(RFolderItem *ritem)
use_default_user_agent = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(ritem->feedprop->use_default_user_agent));
ritem->use_default_user_agent = use_default_user_agent;
- debug_print("store: use default user agent is %s\n",
+ debug_print("RSSyl: store: use default user agent is %s\n",
( use_default_user_agent ? "ON" : "OFF" ) );
specific_user_agent = (gchar *)gtk_entry_get_text(GTK_ENTRY(ritem->feedprop->specific_user_agent));
diff --git a/src/plugins/rssyl/rssyl_update_comments.c b/src/plugins/rssyl/rssyl_update_comments.c
@@ -74,7 +74,7 @@ void rssyl_update_comments(RFolderItem *ritem)
debug_print("RSSyl: starting to parse comments, path is '%s'\n", path);
if( (dp = g_dir_open(path, 0, &error)) == NULL ) {
- debug_print("g_dir_open on \"%s\" failed with error %d (%s)\n",
+ debug_print("RSSyl: g_dir_open on \"%s\" failed with error %d (%s)\n",
path, error->code, error->message);
g_error_free(error);
g_free(path);
diff --git a/src/plugins/rssyl/rssyl_update_feed.c b/src/plugins/rssyl/rssyl_update_feed.c
@@ -368,6 +368,7 @@ static gboolean rssyl_update_recursively_func(GNode *node, gpointer data, gboole
ritem = (RFolderItem *)item;
if( ritem->url != NULL ) {
+ debug_print("RSSyl: %s refresh'\n", item->name ? "Manual" : "Automated");
if((manual_refresh == FALSE) &&
rssyl_prefs_get()->refresh_all_skips &&
(ritem->default_refresh_interval == FALSE) &&