oneaccess.gramar: syslog config
authorTomas Zeman <tzeman@volny.cz>
Tue, 21 Aug 2012 12:10:00 +0200
changeset 38 d925a22bbcf3
parent 37 7174a6414069
child 39 b39ab9900b24
oneaccess.gramar: syslog config
oneaccess.gramar
--- a/oneaccess.gramar	Tue Aug 21 11:59:38 2012 +0200
+++ b/oneaccess.gramar	Tue Aug 21 12:10:00 2012 +0200
@@ -60,6 +60,7 @@
 		| s_interface
 		| l_vrf
 		| l_sntp
+		| l_syslog
 		| indent comment 
 		| indent cmdline 
 		| indent emptyline
@@ -205,8 +206,7 @@
 l_vrf:		"0" "ip" "vrf" keyword eol
 		{ $::res->{"ip-vrf"} = $item{keyword} }
 
-# sntp
-sntp_iface:	iface_type iface_num
+via_iface:	iface_type iface_num
 		{
 		$arg{ctx}->{interface} = {
 			type => $item{iface_type},
@@ -215,5 +215,10 @@
 		}
 		| ""
 
-l_sntp:		"0" "sntp" "server" ip sntp_iface[ctx => ctx('sntp-server', $item{ip})] eol
+# sntp
+l_sntp:		"0" "sntp" "server" ip via_iface[ctx => ctx('sntp-server', $item{ip})] eol
 
+l_syslog:	"0" "syslog" "server" ip num via_iface[ctx => ctx('syslog', 'server', $item{ip})] eol
+		| "0" "logging" "syslog" /\w+/ eol
+		{ $::res->{syslog}->{level} = $item[4]; }
+