Implemented '--syslog' and '--syslog-facility'.
[captive.git] / src / libcaptive / client / vfs.c
index 360e9fa..e668f97 100644 (file)
@@ -32,6 +32,7 @@
 #include "captive/client-directory.h"
 #include "reactos/ntos/zw.h"   /* for NtQueryVolumeInformationFile() */
 #include "result.h"
+#include "init.h"
 
 
 static gpointer captive_vfs_object_parent_class=NULL;
@@ -91,11 +92,6 @@ static const GTypeInfo captive_vfs_object_info={
 }
 
 
-static void    log_discard_func(const gchar *log_domain,GLogLevelFlags log_level,const gchar *message,gpointer user_data)
-{
-       /* NOP */
-}
-
 GnomeVFSResult captive_vfs_new
                (CaptiveVfsObject **captive_vfs_object_return,const struct captive_options *options)
 {
@@ -106,23 +102,7 @@ gboolean errbool;
        g_return_val_if_fail(options!=NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
 
        /* Here is the first initializaton point of parent in sandboxed mode. */
-       if (!options->debug_messages) {
-               g_log_set_handler(
-                               G_LOG_DOMAIN,   /* log_domain; "Captive" */
-                               0       /* log_levels */
-                                               | G_LOG_FLAG_RECURSION
-                                               | G_LOG_FLAG_FATAL
-                                               /* The same mask is in:
-                                                * libcaptive/sandbox/server-GLogFunc.c
-                                                * libcaptive/client/init.c
-                                                * libcaptive/client/vfs.c
-                                                */
-                                               | G_LOG_LEVEL_MESSAGE
-                                               | G_LOG_LEVEL_INFO
-                                               | G_LOG_LEVEL_DEBUG,
-                               log_discard_func,       /* log_func */
-                               NULL);  /* user_data */
-               }
+       captive_log_init(options);
 
        *captive_vfs_object_return=NULL;