bindings/erlang: Added copyright and license header.
[collectd.git] / src / logfile.c
index 8e98c04..7b96ac5 100644 (file)
@@ -74,9 +74,7 @@ static int logfile_config (const char *key, const char *value)
                log_file = strdup (value);
        }
        else if (0 == strcasecmp (key, "Timestamp")) {
-               if ((strcasecmp (value, "false") == 0)
-                               || (strcasecmp (value, "no") == 0)
-                               || (strcasecmp (value, "off") == 0))
+               if (IS_FALSE (value))
                        print_timestamp = 0;
                else
                        print_timestamp = 1;
@@ -187,7 +185,8 @@ static int logfile_notification (const notification_t *n,
 
        buf[sizeof (buf) - 1] = '\0';
 
-       logfile_print (buf, n->time);
+       logfile_print (buf,
+                       (n->time > 0) ? n->time : time (NULL));
 
        return (0);
 } /* int logfile_notification */