/// <summary> /// 程序启动时,记录目录 /// </summary> /// <param name="env"></param> public static void LogWhenStart(IHostingEnvironment env) { StringBuilder sb = new StringBuilder(); sb.AppendLine("程序启动"); sb.AppendLine("ContentRootPath:" + env.ContentRootPath); sb.AppendLine("WebRootPath:" + env.WebRootPath); sb.AppendLine("IsDevelopment:" + env.IsDevelopment()); LogAgent.Write(LogLevel.Info, sb.ToString()); }