app: turn magic matching debug output into GIMP_LOG()

This commit is contained in:
Michael Natterer 2017-07-28 22:35:13 +02:00
parent d227a0d71f
commit 7a10afca39
2 changed files with 12 additions and 6 deletions

View File

@ -41,7 +41,8 @@ typedef enum
GIMP_LOG_RECTANGLE_TOOL = 1 << 17,
GIMP_LOG_BRUSH_CACHE = 1 << 18,
GIMP_LOG_PROJECTION = 1 << 19,
GIMP_LOG_XCF = 1 << 20
GIMP_LOG_XCF = 1 << 20,
GIMP_LOG_MAGIC_MATCH = 1 << 21
} GimpLogFlags;

View File

@ -35,6 +35,8 @@
#include "gimppluginmanager-file-procedure.h"
#include "gimppluginprocedure.h"
#include "gimp-log.h"
#include "gimp-intl.h"
@ -159,9 +161,10 @@ file_procedure_find (GSList *procs,
}
else if (match_val != FILE_MATCH_NONE)
{
g_printerr ("magic match %d on %s\n",
match_val,
gimp_object_get_name (file_proc));
GIMP_LOG (MAGIC_MATCH,
"magic match %d on %s\n",
match_val,
gimp_object_get_name (file_proc));
if (match_val > best_match_val)
{
@ -178,8 +181,10 @@ file_procedure_find (GSList *procs,
if (best_file_proc)
{
g_printerr ("best magic match on %s\n",
gimp_object_get_name (best_file_proc));
GIMP_LOG (MAGIC_MATCH,
"best magic match on %s\n",
gimp_object_get_name (best_file_proc));
return best_file_proc;
}
}