Skip to content

Commit

Permalink
Disable transaction logging by default, and don't start it on session…
Browse files Browse the repository at this point in the history
… close
  • Loading branch information
gjanssens committed May 25, 2024
1 parent 947e0a2 commit 4bc1dba
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
6 changes: 1 addition & 5 deletions libgnucash/engine/TransLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static QofLogModule log_module = "gnc.translog";
/* ------------------------------------------------------------------ */


static int gen_logs = 1;
static int gen_logs = 0;
static FILE * trans_log = nullptr; /**< current log file handle */
static char * trans_log_name = nullptr; /**< current log file name */
static char * log_base_name = nullptr;
Expand All @@ -100,10 +100,6 @@ void xaccLogEnable (void)
{
gen_logs = 1;
}
gboolean xaccLogIsEnabled (void)
{
return (gen_logs == 1);
}

/********************************************************************\
\********************************************************************/
Expand Down
3 changes: 0 additions & 3 deletions libgnucash/engine/TransLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ void xaccLogEnable (void);
/** document me */
void xaccLogDisable (void);

/** document me */
gboolean xaccLogIsEnabled (void);

/** The xaccLogSetBaseName() method sets the base filepath and the
* root part of the journal file name. If the journal file is
* already open, it will close it and reopen it with the new
Expand Down
6 changes: 1 addition & 5 deletions libgnucash/engine/gnc-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ void gnc_clear_current_session()
{
if (current_session)
{
gboolean save_log_state = xaccLogIsEnabled();
if (save_log_state)
xaccLogDisable();
xaccLogDisable();
qof_session_destroy(current_session);
if (save_log_state)
xaccLogEnable();
current_session = NULL;
}
}

0 comments on commit 4bc1dba

Please sign in to comment.