summaryrefslogtreecommitdiff
path: root/sysdep/unix/config.Y
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/config.Y')
-rw-r--r--sysdep/unix/config.Y10
1 files changed, 8 insertions, 2 deletions
diff --git a/sysdep/unix/config.Y b/sysdep/unix/config.Y
index ac5be7e2..844f53df 100644
--- a/sysdep/unix/config.Y
+++ b/sysdep/unix/config.Y
@@ -14,12 +14,13 @@ CF_HDR
CF_DECLS
CF_KEYWORDS(LOG, SYSLOG, ALL, DEBUG, TRACE, INFO, REMOTE, WARNING, ERROR, AUTH, FATAL, BUG, STDERR, SOFT)
-CF_KEYWORDS(TIMEFORMAT, ISO, SHORT, LONG, BASE)
+CF_KEYWORDS(TIMEFORMAT, ISO, SHORT, LONG, BASE, NAME)
%type <i> log_mask log_mask_list log_cat
%type <g> log_file
%type <t> cfg_name
%type <tf> timeformat_which
+%type <t> syslog_name
CF_GRAMMAR
@@ -33,13 +34,18 @@ log_config: LOG log_file log_mask ';' {
}
;
+syslog_name:
+ NAME TEXT { $$ = $2; }
+ | { $$ = bird_name; }
+ ;
+
log_file:
TEXT {
FILE *f = tracked_fopen(new_config->pool, $1, "a");
if (!f) cf_error("Unable to open log file `%s': %m", $1);
$$ = f;
}
- | SYSLOG { $$ = NULL; }
+ | SYSLOG syslog_name { $$ = NULL; new_config->syslog_name = $2; }
| STDERR { $$ = stderr; }
;