private static void Syslog() { if (CurrentConfiguration.Services.SyslogNg.Active) { SyslogNg.Apply(); } }
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); }; }