mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bindings - move log wrappers into the swig interface files
They are only used for guile (and possibly python, so there's no need to carry them around in core-utils.
This commit is contained in:
parent
e5c6f6026b
commit
7765e13704
@ -90,11 +90,6 @@ gchar * gnc_build_stdreports_path(const gchar *);
|
|||||||
%newobject gnc_build_reports_path;
|
%newobject gnc_build_reports_path;
|
||||||
gchar * gnc_build_reports_path(const gchar *);
|
gchar * gnc_build_reports_path(const gchar *);
|
||||||
|
|
||||||
void gnc_scm_log_warn(const gchar *);
|
|
||||||
void gnc_scm_log_error(const gchar *);
|
|
||||||
void gnc_scm_log_msg(const gchar *);
|
|
||||||
void gnc_scm_log_debug(const gchar *);
|
|
||||||
|
|
||||||
%newobject gnc_utf8_strip_invalid_strdup;
|
%newobject gnc_utf8_strip_invalid_strdup;
|
||||||
gchar * gnc_utf8_strip_invalid_strdup(const gchar *);
|
gchar * gnc_utf8_strip_invalid_strdup(const gchar *);
|
||||||
|
|
||||||
|
@ -111,6 +111,15 @@ engine-common.i */
|
|||||||
%include "qoflog.h"
|
%include "qoflog.h"
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
static void gnc_log_warn(const char *msg)
|
||||||
|
{ g_log("gnc.scm", G_LOG_LEVEL_WARNING, "%s", msg); }
|
||||||
|
static void gnc_log_error(const char *msg)
|
||||||
|
{ g_log("gnc.scm", G_LOG_LEVEL_CRITICAL, "%s", msg); }
|
||||||
|
static void gnc_log_msg(const char *msg)
|
||||||
|
{ g_log("gnc.scm", G_LOG_LEVEL_MESSAGE, "%s", msg); }
|
||||||
|
static void gnc_log_debug(const char *msg)
|
||||||
|
{ g_log("gnc.scm", G_LOG_LEVEL_DEBUG, "%s", msg); }
|
||||||
|
|
||||||
static const GncGUID * gncPriceGetGUID(GNCPrice *x)
|
static const GncGUID * gncPriceGetGUID(GNCPrice *x)
|
||||||
{ return qof_instance_get_guid(QOF_INSTANCE(x)); }
|
{ return qof_instance_get_guid(QOF_INSTANCE(x)); }
|
||||||
static const GncGUID * gncBudgetGetGUID(GncBudget *x)
|
static const GncGUID * gncBudgetGetGUID(GncBudget *x)
|
||||||
|
@ -40,17 +40,17 @@
|
|||||||
(string-join (map (lambda (x) (format #f "~A" x)) items) ""))
|
(string-join (map (lambda (x) (format #f "~A" x)) items) ""))
|
||||||
|
|
||||||
(define (gnc:warn . items)
|
(define (gnc:warn . items)
|
||||||
(gnc-scm-log-warn (strify items)))
|
(gnc-log-warn (strify items)))
|
||||||
|
|
||||||
(define (gnc:error . items)
|
(define (gnc:error . items)
|
||||||
(gnc-scm-log-error (strify items )))
|
(gnc-log-error (strify items )))
|
||||||
|
|
||||||
(define (gnc:msg . items)
|
(define (gnc:msg . items)
|
||||||
(gnc-scm-log-msg (strify items)))
|
(gnc-log-msg (strify items)))
|
||||||
|
|
||||||
(define (gnc:debug . items)
|
(define (gnc:debug . items)
|
||||||
(when (qof-log-check "gnc.scm" QOF-LOG-DEBUG)
|
(when (qof-log-check "gnc.scm" QOF-LOG-DEBUG)
|
||||||
(gnc-scm-log-debug (strify items))))
|
(gnc-log-debug (strify items))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; the following functions are initialized to log message to tracefile
|
;; the following functions are initialized to log message to tracefile
|
||||||
|
@ -287,30 +287,6 @@ gnc_g_list_cut(GList **list, GList *cut_point)
|
|||||||
cut_point->prev = NULL;
|
cut_point->prev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
gnc_scm_log_warn(const gchar *msg)
|
|
||||||
{
|
|
||||||
g_log("gnc.scm", G_LOG_LEVEL_WARNING, "%s", msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gnc_scm_log_error(const gchar *msg)
|
|
||||||
{
|
|
||||||
g_log("gnc.scm", G_LOG_LEVEL_CRITICAL, "%s", msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gnc_scm_log_msg(const gchar *msg)
|
|
||||||
{
|
|
||||||
g_log("gnc.scm", G_LOG_LEVEL_MESSAGE, "%s", msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gnc_scm_log_debug(const gchar *msg)
|
|
||||||
{
|
|
||||||
g_log("gnc.scm", G_LOG_LEVEL_DEBUG, "%s", msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
gchar *
|
gchar *
|
||||||
gnc_g_list_stringjoin (GList *list_of_strings, const gchar *sep)
|
gnc_g_list_stringjoin (GList *list_of_strings, const gchar *sep)
|
||||||
|
@ -169,16 +169,6 @@ void gnc_g_list_cut(GList **list, GList *cut_point);
|
|||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/** @name Message Logging
|
|
||||||
@{
|
|
||||||
*/
|
|
||||||
void gnc_scm_log_warn(const gchar *msg);
|
|
||||||
void gnc_scm_log_error(const gchar *msg);
|
|
||||||
void gnc_scm_log_msg(const gchar *msg);
|
|
||||||
void gnc_scm_log_debug(const gchar *msg);
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Return a string joining a GList whose elements are gchar*
|
* @brief Return a string joining a GList whose elements are gchar*
|
||||||
|
Loading…
Reference in New Issue
Block a user