protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //写日志 FlashLogger.Instance().Register(); }
public void EncryptTest() { FlashLogger.Instance().Register(); string orgUserName = "******"; string secret = "111111"; string key = "yss.yh"; var uname = MySecurity.SEncryptString(orgUserName, key); var psd = MySecurity.SEncryptString(secret, key); FlashLogger.Info(string.Format("\r\nOrgUserName:\r\n{0}\r\nSecret:\r\n{1}\r\n", uname, psd)); }
//http://www.cnblogs.com/emrys5/p/6693454.html static void Main(string[] args) { FlashLogger.Instance().Register(); FlashLogger.Debug("Debug"); FlashLogger.Debug("Debug", new Exception("testexception")); FlashLogger.Info("Info"); FlashLogger.Fatal("Fatal"); FlashLogger.Error("Error"); FlashLogger.Warn("Warn", new Exception("testexception")); }
public void TestWriteLog() { FlashLogger.Instance().Register(); FlashLogger.Debug("Debug"); FlashLogger.Debug("Debug", new Exception("testexception")); FlashLogger.Info("Info"); FlashLogger.Fatal("Fatal"); FlashLogger.Error("Error"); FlashLogger.Warn("Warn", new Exception("testexception")); }
/// <summary> /// 应用程序的主入口点。 /// </summary> static void Main(string[] args) { FlashLogger.Instance().Register(); HostFactory.Run(x => { x.UseLog4Net(); x.Service <ServiceRunner>(); x.SetDescription("浙江省药械采购中心基础数据下载更新同步,上传下载各类单据."); x.SetDisplayName("药械采购平台数据定时更新同步服务"); x.SetServiceName("ZjyxcgServiceQuartz"); x.EnablePauseAndContinue(); }); //Test(); }
protected void Application_Start() { GlobalConfiguration.Configure(WebApiConfig.Register); FlashLogger.Instance().Register(); }
protected void Application_Start(object sender, EventArgs e) { Application["UserCount"] = 0; FlashLogger.Instance().Register(); }