Skip to content

Commit

Permalink
Fix: define LOG_REFERENCES_AVAILABLE in header
Browse files Browse the repository at this point in the history
Must be defined in the header to apply to applications using this library, when build in release mode.

(cherry picked from commit c05cbad)
  • Loading branch information
Kraemii committed Feb 9, 2023
1 parent a97a53a commit 4daf825
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 1 addition & 7 deletions base/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@
*/
#define G_LOG_DOMAIN "libgvm base"

/**
* @brief for backward compatibility
*
*/
#define LOG_REFERENCES_AVAILABLE

/**
* @struct gvm_logging_t
* @brief Logging stores the parameters loaded from a log configuration
Expand Down Expand Up @@ -581,7 +575,7 @@ gvm_log_func (const char *log_domain, GLogLevelFlags log_level,
/* If the current char is a % and the next one is a p, get the pid. */
if ((*tmp == '%') && (*(tmp + 1) == 'p'))
{
if (reference != NULL)
if (reference)
{
prepend_tmp =
g_strdup_printf ("%s%d%s%s", prepend_buf, (int) getpid (),
Expand Down
6 changes: 6 additions & 0 deletions base/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@

#include <glib.h> /* for GSList, gchar, GLogLevelFlags, gpointer */

/**
* @brief for backward compatibility
*
*/
#define LOG_REFERENCES_AVAILABLE

GSList *
load_log_configuration (gchar *);

Expand Down

0 comments on commit 4daf825

Please sign in to comment.