collectd-exec(5): Improved description of the value-list identifier.
[collectd.git] / src / logfile.c
index ceee7b8..22c5435 100644 (file)
@@ -1,6 +1,7 @@
 /**
  * collectd - src/logfile.c
  * Copyright (C) 2007  Sebastian Harl
+ * Copyright (C) 2007  Florian Forster
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -66,18 +67,7 @@ static int logfile_config (const char *key, const char *value)
        }
        else if (0 == strcasecmp (key, "File")) {
                sfree (log_file);
-
-               if ((strcasecmp (value, "stdout") == 0)
-                               || (strcasecmp (value, "stderr") == 0)
-                               || (access (value, W_OK) == 0))
-                       log_file = strdup (value);
-               else {
-                       char errbuf[1024];
-                       /* We can't use `ERROR' yet.. */
-                       fprintf (stderr, "logfile plugin: Access to %s denied: %s\n",
-                                       value, sstrerror (errno, errbuf, sizeof (errbuf)));
-                       return 1;
-               }
+               log_file = strdup (value);
        }
        else {
                return -1;
@@ -129,7 +119,6 @@ void module_register (void)
        plugin_register_config ("logfile", logfile_config,
                        config_keys, config_keys_num);
        plugin_register_log ("logfile", logfile_log);
-       return;
 } /* void module_register (void) */
 
 /* vim: set sw=4 ts=4 tw=78 noexpandtab : */