--- freem/src/global_dispatch.c 2025/04/13 04:22:43 1.10 +++ freem/src/global_dispatch.c 2025/04/17 14:34:27 1.11 @@ -1,5 +1,5 @@ /* - * $Id: global_dispatch.c,v 1.10 2025/04/13 04:22:43 snw Exp $ + * $Id: global_dispatch.c,v 1.11 2025/04/17 14:34:27 snw Exp $ * global handler dispatch module * * @@ -24,6 +24,9 @@ * along with FreeM. If not, see . * * $Log: global_dispatch.c,v $ + * Revision 1.11 2025/04/17 14:34:27 snw + * Further logging improvements + * * Revision 1.10 2025/04/13 04:22:43 snw * Fix snprintf calls * @@ -65,6 +68,7 @@ #include "journal.h" #include "iftab.h" #include "shmmgr.h" +#include "log.h" void (*gbl_u)(short, char *, char *); void (*gbl_s)(short, char *, char *); @@ -89,14 +93,9 @@ void global_set_engine(char ns, char *en if (strcmp (engine, "BUILTIN") == 0) { gbl_u = &global_bltin; } -#if defined(GVH_BDB) - else if (strcmp (engine, "BERKELEYDB") == 0) { - gbl_u = &global_bdb; - } -#endif else { - fprintf (stderr, "global_set_engine: invalid global handler '%s' or FreeM built without '%s' global handler support.\r\n", engine, engine); - fprintf (stderr, "global set_engine: defaulting to 'BUILTIN' global handler for namespace '%s'.\r\n", nsname); + logprintf (FM_LOG_WARNING, "global_set_engine: invalid global handler '%s' or FreeM built without '%s' global handler support", engine, engine); + logprintf (FM_LOG_WARNING, "global_set_engine: defaulting to 'BUILTIN' global handler for namespace '%s'", nsname); gbl_u = &global_bltin; } @@ -108,14 +107,9 @@ void global_set_engine(char ns, char *en if (strcmp (engine, "BUILTIN") == 0) { gbl_s = &global_bltin; } -#if defined(GVH_BDB) - else if (strcmp (engine, "BERKELEYDB") == 0) { - gbl_s = &global_bdb; - } -#endif else { - fprintf (stderr, "global_set_engine: invalid global handler '%s' or FreeM built without '%s' global handler support.\r\n", engine, engine); - fprintf (stderr, "global set_engine: defaulting to 'BUILTIN' global handler for namespace 'SYSTEM'.\r\n"); + logprintf (FM_LOG_WARNING, "global_set_engine: invalid global handler '%s' or FreeM built without '%s' global handler support", engine, engine); + logprintf (FM_LOG_WARNING, "global_set_engine: defaulting to 'BUILTIN' global handler for namespace 'SYSTEM'"); gbl_s = &global_bltin; }