tLogging functions now "work" properly in the client as well as in the server, and are used to report on plugin initialisation status; dopelog now takes one or more flags, LF_SERVER being the only one defined so far. - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 198d309c67c6c65159ef282f7fc0febe27187bfb
(DIR) parent bc1c42520535cf76294614d2f4d71a361aea8950
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Fri, 24 May 2002 11:30:09 +0000
Logging functions now "work" properly in the client as well as in the server,
and are used to report on plugin initialisation status; dopelog now takes
one or more flags, LF_SERVER being the only one defined so far.
Diffstat:
M src/sound.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
(DIR) diff --git a/src/sound.c b/src/sound.c
t@@ -37,6 +37,7 @@
#include "plugins/sound_winmm.h"
#endif
+#include "dopewars.h"
#include "nls.h"
#include "sound.h"
t@@ -70,7 +71,7 @@ static void AddPlugin(InitFunc ifunc, void *module)
SoundDriver *newdriver = (*ifunc)();
if (newdriver) {
- g_print("%s sound plugin init OK\n", newdriver->name);
+ dopelog(5, 0, "%s sound plugin init OK\n", newdriver->name);
newdriver->module = module;
driverlist = g_slist_append(driverlist, newdriver);
}
t@@ -90,7 +91,7 @@ static void OpenModule(const gchar *modname, const gchar *fullname)
soundmodule = dlopen(fullname, RTLD_NOW);
if (!soundmodule) {
/* FIXME: using dlerror() here causes a segfault later in the program */
- g_print("dlopen of %s failed: %s\n", fullname, dlerror());
+ dopelog(3, 0, "dlopen of %s failed: %s\n", fullname, dlerror());
return;
}
t@@ -102,7 +103,7 @@ static void OpenModule(const gchar *modname, const gchar *fullname)
if (ifunc) {
AddPlugin(ifunc, soundmodule);
} else {
- g_print("dlsym (%s) failed: %s\n", funcname->str, dlerror());
+ dopelog(3, 0, "dlsym (%s) failed: %s\n", funcname->str, dlerror());
dlclose(soundmodule);
}
g_string_free(funcname, TRUE);
t@@ -131,7 +132,7 @@ static void ScanPluginDir(const gchar *dirname)
g_string_free(modname, TRUE);
closedir(dir);
} else {
- g_print("Cannot open dir %s\n", dirname);
+ dopelog(5, 0, "Cannot open dir %s\n", dirname);
}
}
#endif
t@@ -177,7 +178,7 @@ void SoundOpen(gchar *drivername)
driver = GetPlugin(drivername);
if (driver) {
if (driver->open) {
- g_print("Using plugin %s\n", driver->name);
+ dopelog(3, 0, "Using plugin %s\n", driver->name);
driver->open();
}
} else if (drivername) {