summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9b10e3c)
raw | patch | inline | side by side (parent: 9b10e3c)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 11 Jan 2017 12:39:27 +0000 (13:39 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Wed, 22 Feb 2017 17:34:07 +0000 (18:34 +0100) |
src/log_logstash.c | patch | blob | history |
diff --git a/src/log_logstash.c b/src/log_logstash.c
index 837796197a24387efa26e303405d61544db446b4..3ef7139702a270ce9c8e3f1d6139625012c60f99 100644 (file)
--- a/src/log_logstash.c
+++ b/src/log_logstash.c
#define HAVE_YAJL_V2 1
#endif
-#define DEFAULT_LOGFILE LOCALSTATEDIR "/log/" PACKAGE_NAME ".json.log"
-
#if COLLECT_DEBUG
static int log_level = LOG_DEBUG;
#else
pthread_mutex_lock(&file_lock);
if (log_file == NULL) {
- fh = fopen(DEFAULT_LOGFILE, "a");
- do_close = 1;
+ fh = stderr;
} else if (strcasecmp(log_file, "stdout") == 0) {
fh = stdout;
do_close = 0;
if (fh == NULL) {
char errbuf[1024];
- fprintf(stderr, "log_logstash plugin: fopen (%s) failed: %s\n",
- (log_file == NULL) ? DEFAULT_LOGFILE : log_file,
+ fprintf(stderr, "log_logstash plugin: fopen (%s) failed: %s\n", log_file,
sstrerror(errno, errbuf, sizeof(errbuf)));
} else {
fprintf(fh, "%s\n", buf);