luci-mod-admin-full: add log_file and log_proto support
[project/luci.git] / modules / luci-mod-admin-full / luasrc / model / cbi / admin_system / system.lua
index f4c2ac1..c7fdfcd 100644 (file)
@@ -1,5 +1,5 @@
 -- Copyright 2008 Steven Barth <steven@midlink.org>
--- Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
+-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
 -- Licensed to the public under the Apache License 2.0.
 
 local sys   = require "luci.sys"
@@ -80,6 +80,14 @@ o.optional    = true
 o.placeholder = 514
 o.datatype    = "port"
 
+o = s:taboption("logging", ListValue, "log_proto", translate("External system log server protocol"))
+o:value("udp", "UDP")
+o:value("tcp", "TCP")
+
+o = s:taboption("logging", Value, "log_file", translate("Write system log to file"))
+o.optional    = true
+o.placeholder = "/tmp/system.log"
+
 o = s:taboption("logging", ListValue, "conloglevel", translate("Log output level"))
 o:value(8, translate("Debug"))
 o:value(7, translate("Info"))
@@ -204,7 +212,7 @@ if has_ntpd then
 
 
                o = s:option(DynamicList, "server", translate("NTP server candidates"))
-               o.datatype = "host"
+               o.datatype = "host(0)"
                o:depends("enable", "1")
 
                -- retain server list even if disabled