summaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-05-01 16:26:39 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-05-01 16:26:39 +0200
commit8ccba8ebfaca85017eb125c45b0f16ae358358a7 (patch)
treec359b684bbc2ef0f0e60c190628fe4ab39599055 /src/log.c
parent8e589f3a3ad74dd4409632222c589aea7c0939a5 (diff)
downloadfastd-8ccba8ebfaca85017eb125c45b0f16ae358358a7.tar
fastd-8ccba8ebfaca85017eb125c45b0f16ae358358a7.zip
Remove support for log files
syslog/journald do a much better job at organizing logs, with the additional advantage of proper log rotation. If someone really wants to have a log file for fastd, they can just redirect stderr.
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/log.c b/src/log.c
index 9bcbd14..b274dbd 100644
--- a/src/log.c
+++ b/src/log.c
@@ -239,7 +239,7 @@ void fastd_logf(fastd_loglevel_t level, const char *format, ...) {
buffer[sizeof(buffer)-1] = 0;
- if (!ctx.log_initialized || level <= conf.log_stderr_level || conf.log_files) {
+ if (!ctx.log_initialized || level <= conf.log_stderr_level) {
time_t t;
struct tm tm;
@@ -256,11 +256,5 @@ void fastd_logf(fastd_loglevel_t level, const char *format, ...) {
if (ctx.log_initialized) {
if (level <= conf.log_syslog_level)
syslog(get_syslog_level(level), "%s", buffer);
-
- fastd_log_fd_t *file;
- for (file = ctx.log_files; file; file = file->next) {
- if (level <= file->config->level)
- dprintf(file->fd, "%s%s%s\n", timestr, get_log_prefix(level), buffer);
- }
}
}