示例#1
0
 private static void Syslog()
 {
     if (CurrentConfiguration.Services.SyslogNg.Active)
     {
         SyslogNg.Apply();
     }
 }
示例#2
0
        public SyslogNgModule() : base("/syslogng")
        {
            Get["/"] = x => {
                return(JsonConvert.SerializeObject(Application.CurrentConfiguration.Services.SyslogNg));
            };

            Post["/save"] = x => {
                string data    = Request.Form.Data;
                var    objects = JsonConvert.DeserializeObject <SyslogNgModel>(data);
                Application.CurrentConfiguration.Services.SyslogNg = objects;
                ConfigRepo.Save();
                return(HttpStatusCode.OK);
            };

            Post["/apply"] = x => {
                SyslogNg.Apply();
                return(HttpStatusCode.OK);
            };
        }