<address id="xpjh9"><listing id="xpjh9"><meter id="xpjh9"></meter></listing></address>

<address id="xpjh9"><address id="xpjh9"><listing id="xpjh9"></listing></address></address>
<noframes id="xpjh9">
<noframes id="xpjh9">

<address id="xpjh9"><address id="xpjh9"><listing id="xpjh9"></listing></address></address>
    <form id="xpjh9"></form><address id="xpjh9"><listing id="xpjh9"><menuitem id="xpjh9"></menuitem></listing></address>

      <noframes id="xpjh9">
      VB.net 2010 視頻教程 VB.net 2010 視頻教程 VB.net 2010 視頻教程
      SQL Server 2008 視頻教程 c#入門經典教程 Visual Basic從門到精通視頻教程
      當前位置:
      首頁 > 編程開發 > .net教程 >
      • ASP.net教程之收集錯誤日志方法

      • 2019-06-11 21:17 來源:未知
      復制代碼
      public static void WriteLog(string log)
      {
        StreamWriter fw = null;
        //string filePath = Directory.GetCurrentDirectory();
        string filePath = AppDomain.CurrentDomain.BaseDirectory;
        if (!filePath.EndsWith(@"\Resource"))
        {
            filePath = filePath + "Resource";
        }
        string fileName = filePath + "\\log.txt";
        try
        {
            if (File.Exists(fileName))
            {
                fw = File.AppendText(fileName);
            }
            else
            {
                fw = File.CreateText(fileName);
            }
            fw.WriteLine(log);
        }
        catch (Exception e) { }
        finally
        {
            if (fw != null)
            {
                try { fw.Close(); } catch (Exception e1) { }
            }
        }
      }
      //Resource 文件夾下有個log.txt文件,用于記錄錯誤日志
      
      在其他方法中調用:

      WriteLog("時間:" + DateTime.Now.ToString());
      WriteLog("XXX 方法錯誤");
      WriteLog("Error:" + e.ToString().Trim());

       
      復制代碼
      相關教程
      江苏快3 www.799439.com | www.234259.com | www.sygj2.com | www.81678f.com | www.77djcp.com | www.535059.com | www.925831.com | www.2373m.com | www.3416x.com | www.636by.com | www.50732h.com | www.80065d.com | www.562500.com | www.sytg9.com | www.916730.com | www.424770.com | www.805681.com | www.985026.com | www.gai00.com | www.369071.com | www.558401.com | www.026918.com | www.150962.com | www.021067.com | www.33112e.com | www.50054z.com | www.89894d.com | www.68682e.com | www.36166h.com | www.84499j.com | www.33997s.com | www.26299p.com | www.87668p.com | www.022b.cc | www.2tdc.com | www.348677.com | www.77210k.com | www.7777y.cc | www.c5235.com | www.766602.com | www.51515z.com | www.88goc.com | www.wcp8008.com | www.659776.com | www.505518.com | www.26878n.com | www.yi816.com | www.178591.com | www.2632q.com | www.607256.com | www.355246.com | www.5091t.com | www.903029.com | www.65707e.com | www.2109i.com | www.513061.com | www.88065c.com | www.951816.com | www.88266r.com | www.23040.com | www.88266c.com | www.c136.vip | www.68568u.com | www.900241.com | www.97655s.com | www.524677.com | www.2934u.com | www.liuguan000.com | www.60108c.com | www.598799.com | www.78949w.com | www.663948.com | www.33598j.com | www.xinyc1.com | www.6fa500.com | www.50052z.com | www.tcp969.com | www.77803b.com | www.372879.com | www.696by.com | www.77803e.com | www.808791.com | www.34788l.com | www.101282.com | www.ya318.com | www.83033h.com | www.389744.com | www.7fk.com | www.77801r.com | www.dcw345.com | www.862455.com | www.3126e.com | www.65707g.com | www.605366.com | www.cpw | www.36788j.com | www.336766.com | www.701524.com | www.26299q.com | www.80065l.com | www.346377.com | www.887771.com | www.66wcw.com | www.60108y.com | www.196065.com | www.599487.com | www.318548.com | www.6364k.com | www.60108k.com | www.316477.com | www.691663.com | www.918109.com | www.cp3158.com | www.tang777.com | www.2632i.com | www.50064r.com | www.128083.com | www.239838.com | www.506931.com | www.701487.com | www.767198.com | www.djcp009.com | www.795335.com | www.987423.com | www.cszb9.com | www.8499b.com | www.5441i.com | www.266ak.com | www.67258d.com | www.50051t.com | www.60123x.com | www.22303.cc | www.355183.com | www.580819.com | www.763236.com | www.876879.com | www.54968f.com | www.hcw266.com | www.550417.com | www.533721.com | www.550421.com | www.485689.com | www.307797.com | www.339189.com | www.196556.com | www.80075h.com | www.50051c.com | www.80075b.com | www.60108s.com | www.83565.com | www.71233y.com | www.66332b.com | www.3416n.com | www.898341.com | www.669537.com | www.599748.com | www.202812.com | www.50064k.com | www.50024d.com | www.658zf.com | www.903559.com | www.594911.com | www.77114q.com | www.87467.com | www.967699.com | www.516113.com | www.050955.com | www.52303z.com | www.1555hc.com | www.993572.com | www.556346.com | www.68568q.com | www.34788f.com | www.zcwf4.com | www.663738.com | www.66376h.com | www.6832q.com | www.878743.com | www.225779.com | www.50732y.com | www.c7268.com | www.54968f.com | www.26163r.com | www.c6881.com | www.308139.com | www.50054g.com | www.c1396.com | www.301345.com | www.77114l.com | www.ct8844.com | www.78949s.com | www.23040.com | www.168153.com | www.7793j.com | www.669202.com | www.33588m.com | www.909375.com | www.50054u.com | www.hm2277.com | www.91233q.com | www.9889hc.com | www.342077.com | www.8499x.com | www.321693.com | www.9149j.com | www.607356.com | www.60108z.com | www.607325.com | www.77802w.com | www.631918.com | www.50064w.com | www.504633.com | www.77802r.com | www.hcw018.com | www.50052g.com | www.338057.com | www.696by.com | www.81233d.com | www.988068.com | www.50026j.com | www.390366.com | www.022v.cc | www.52303a.com | www.657666.com | www.8499b.com | www.161763.com | www.074wy.com | www.99638d.com | www.679313.com | www.26878w.com | www.205882.com | www.971291.com | www.21202r.com | www.68682q.com | www.hcw266.com | www.03gcw.com | www.23636m.com | www.412228.com | www.996099.com | www.15355l.com | www.87668c.com | www.669307.com | www.jx68.com | www.igcp4.com | www.26299h.com | www.50024c.com | www.324770.com | www.666405.com | www.hm6633.com | www.2222y.cc | www.9149k.com | www.60123x.com | www.90848a.com | www.444237.com | www.807839.com | www.34czj.com | www.64059.com | www.29277j.com | www.81678v.com | www.210639.com | www.589244.com | www.909309.com | www.7fk.com | www.1035z.com | www.8499x.com | www.66652c.com | www.96386q.com | www.50026h.com | www.76520p.com | www.99788m.com | www.106537.com | www.031079.com | www.bxcp3.com | www.fh7557.com | www.298980.com | www.403552.com | www.401273.com | www.552358.com | www.504033.com | www.507285.com | www.444956.com | www.341077.com | www.233591.com | www.hcw332.com | www.80767k.com | www.77803b.com | www.52072q.com | www.00840i.com | www.54400g.com | www.32123q.com | www.11310.cc | www.qml1.com | www.846631.com | www.599280.com | www.237344.com | www.bxcp3.com | www.50788i.com | www.80767x.com | www.3416u.com | www.gai20.com | www.775720.com | www.444073.com | www.76520z.com | www.50052b.com | www.595hc.com | www.998855a.com | www.585751.com | www.096386.com | www.71399q.com | www.99fzc.com | www.hcw018.com | www.195322.com | www.26163g.com | www.096wy.com | www.907712.com | www.205882.com | www.77114q.com | www.fh2622.com | www.377183.com | www.33997t.com | www.888xm.cc | www.526013.com | www.21202i.com | www.ya909.com | www.355711.com | www.26299j.com | www.930xj.com | www.hcw018.com | www.33997w.com | www.csgc7.com | www.351376.com | www.66332w.com | www.c609.vip | www.77996c.com | www.636by.com | www.501342.com | www.50732h.com | www.832793.com | www.50052u.com | www.df76.com | www.51515i.com | www.hy5155.com | www.96386a.com | www.063wy.com | www.235127.com | www.3890v.com | www.500108.com | www.07929.cc | www.luck886.com | www.3478q.cc | www.139733.com | www.696by.com | www.108805.com | www.11clf.com | www.78949g.com | www.989774.com | www.39500n.com | www.806875.com | www.71399j.com | www.557089.com | www.88ac.com | www.78949y.com | www.584311.com | www.5095f.com | www.033918.com | www.54968f.com | www.60108g.com | www.wcp666888.com | www.6ttz.com | www.71233c.com | www.476669.com | www.bxcp3333.com | www.26878o.com | www.536411.com | www.106ak.com | www.55885c.com | www.589544.com | www.66qxc.com | www.33588d.com | www.508869.com | www.qucw8.com | www.50026z.com | www.130883.com | www.743966.com | www.091wy.com | www.bxcp3.com | www.135125.com | www.657259.com | www.csgc5.com | www.5854n.cc | www.78949d.com | www.bxcp3.com | www.506791.com | www.936317.com | www.202115.com | www.51515j.com | www.68682k.com | www.303204.com | www.luck887.com | www.cp8018.cc | www.7515aa.com | www.16878l.com | www.16188a.com | www.66653e.com | www.196909.com | www.369062.com | www.635918.com | www.hcw332.com | www.cf9901.com | www.rrle3.com | www.5666hc.com | www.8816e.com | www.34788w.com | www.66621h.com | www.80065p.com | www.77803h.com | www.95666w.com | www.89894q.com | www.34788v.com | www.33112h.com | www.16878t.com | www.78949w.com | www.65707s.com | www.39957d.com | www.26299x.com | www.3005w.com | www.9889hc.com | www.664by.com | www.bai355.com | www.fh52.com | www.744646.com | www.546411.com | www.452807.com | www.224066.com | www.81233g.com | www.99788s.com | www.26163t.com | www.000ac.com | www.hw4444.com | www.820155.com | www.578411.com | www.hcw823.com | www.71233l.com | www.78700m.com | www.9478b.com | www.qml1.com | www.584311.com | www.126019.com | www.21202q.com | www.3478i.cc | www.893023.com | www.351781.com | www.53900i.com | www.8667t.com | www.995168.com | www.399010.com | www.50051z.com | www.5854m.cc | www.703270.com | www.101156.com | www.50788f.com | www.gocp2.com | www.399160.com | www.26299s.com | www.87gcw.com | www.521787.com | www.36788m.com | www.588yc.com | www.691063.com | www.78700i.com | www.2408b.cc | www.26299d.com | www.fh6116.com | www.440343.com | www.15355q.com | www.hx8866.com | www.187152.com | www.6611f.cc | www.505151.com | www.78700c.com | www.874110.com | www.77801h.com | www.083wy.com | www.342377.com | www.89959.cc | www.444087.com | www.16878n.com | www.620977.com | www.86267c.com | www.791537.com | www.08588r.com | www.915422.com | www.43131w.com | www.973709.com | www.50788k.com | www.961219.com | www.39500c.com | www.865065.com | www.80767m.com | www.626310.com | www.12455t.com | www.366292.com | www.022gz.cc | www.80075v.com | www.973320.com | www.95999w.com | www.599748.com | www.7782p.com | www.102386.com | www.911888aa.com | www.60108a.com | www.729198.com | www.8816e.com | www.96386k.com | www.914910.com | www.21202f.com | www.153918.com | www.901593.com | www.08588k.com | www.106235.com | www.868216.com | www.7116a.com | www.68682h.com | www.422268.com | www.9889hc.com | www.99788m.com | www.366019.com | www.hx6606.com | www.49956t.com | www.91233z.com | www.629965.com | www.chi59.com | www.60007r.com | www.107186.com | www.677474.com | www.gy11.com | www.2934t.com | www.97655w.com | www.98528i.com | www.456639.com | www.862810.com | www.h701.com | www.2408c.com | www.60123g.com | www.60108j.com | www.178362.com | www.550377.com | www.802133.com | www.zfcp8.com | www.1368b.cc | www.9999y.cc | www.23636h.com | www.689253.com | www.976527.com | www.slyl5.com | www.055g.cc | www.6769r.com | www.21202w.com | www.68689c.com | www.35155w.com | www.58870t.com | www.75538c.com | www.91233z.com | www.015689.com | www.137103.com | www.177474.com | www.178693.com | www.177524.com | www.150957.com | www.118428.com | www.069963.com | www.83033w.com | www.bxcp3.com | www.80075s.com | www.71399y.com | www.50052t.com | www.00840b.com | www.51331b.com | www.89929.cc | www.5666hc.com | www.ztc7.com | www.855085.com | www.621319.com | www.355274.com | www.063766.com | www.50989f.com | www.71399j.com | www.6832t.com | www.10czj.com | www.987969.com | www.luck887.com | www.354977.com | www.91233l.com | www.29277w.com | www.07163d.com | www.070wy.com | www.842686.com | www.23040.com | www.281877.com | www.73166k.com | www.022t.cc | www.850533.com | www.375793.com | www.060888.com | www.71233m.com | www.528qx.com | www.725102.com | www.202812.com | www.83033d.com | www.528qx.com | www.680477.com | www.022173.com | www.39500f.com | www.hy9311.com | www.514977.com | www.36166c.com | www.068wy.com | www.599046.com | www.60007d.com | www.069wy.com | www.601497.com | www.50052j.com | www.062wy.com | www.391438.com | www.81520q.com | www.881799a.com | www.160913.com | www.32123h.com | www.808399.com | www.78700e.com | www.984jc.com | www.493600.com | www.71233w.com | www.809215.com | www.66653o.com | www.ya313.com | www.186792.com | www.3890z.com | www.449589.com | www.15355k.com | www.602913.com | www.61655r.com | www.830523.com | www.07163z.com | www.862422.com | www.15355j.com | www.833314.com | www.84499k.com | www.701547.com | www.61233p.com | www.621410.com | www.08588s.com | www.rcw8811.com | www.3479x.com | www.178213.com | www.ybao4.com | www.60108y.com | www.914906.com | www.88266h.com | www.yc7701.com | www.5086q.com | www.083015.com | www.ck9191.com | www.81233r.com | www.590761.com | www.cll168.com | www.87668o.com | www.929533.com | www.50052d.com | www.202423.com | www.c6127.com | www.97655c.com | www.452817.com | www.mcw7.com | www.77996d.com | www.339351.com | www.cp8009.cc | www.60108t.com | www.235952.com | www.917737.com | www.22030.cc | www.50788w.com | www.629012.com | www.gocp4.com | www.41518q.com | www.679822.com | www.1368l.cc | www.bxcp3.com | www.xinyc1.com | www.828326.com | www.5441r.com | www.51550.cc | www.109317.com | www.701495.com | www.106ak.com | www.61233l.com | www.78700d.com | www.451599.com | www.938906.com | www.9889hc.com | www.71233r.com | www.79520c.com | www.456586.com | www.805733.com | www.csgc8.com | www.8199.cc | www.41518z.com | www.33997r.com | www.81233f.com | www.323518.com | www.590791.com | www.828326.com | www.c705.cc | www.ya383.com | www.2388cai.com | www.12015.cc | www.23636g.com | www.76520b.com | www.12455i.com | www.588yc.com | www.5441n.com | www.01063.com | www.07163c.com | www.50026p.com | www.97655s.com | www.43818q.com | www.60108g.com | www.66653r.com | www.81233z.com | www.84499g.com | www.84499j.com | www.81233m.com | www.77803l.com | www.61655s.com | www.50024g.com | www.16878b.com | www.77803h.com | www.50054b.com | www.16878l.com | www.5522r.cc | www.061wy.com | www.hx1161.com | www.936336.com | www.729987.com | www.560629.com | www.320493.com | www.003963.com | www.50054i.com | www.77802n.com | www.9155e.cc | www.6hcczz.com | www.904829.com | www.572113.com | www.xinyc2.com | www.77803w.com | www.80065y.com | www.5086c.com | www.caim3.com | www.738500.com | www.375781.com | www.78700c.com | www.55228l.com | www.0014d.com | www.ck6587.com | www.621341.com | www.186756.com | www.26299y.com | www.4189e.com | www.965160.com | www.503433.com | www.80767o.com | www.21202q.com | www.hx3355.com | www.535121.com | www.68568g.com | www.9818n.cc | www.hcw823.com | www.210613.com | www.68568m.com | www.gyfc1.com | www.424223.com | www.26163g.com | www.288hc.com | www.634679.com | www.61655m.com | www.104ak.com | www.602470.com | www.50788p.com | www.bxcp3.com | www.535666e.com | www.89894p.com | www.hf0688.com | www.xinyc2.com | www.07163j.com | www.799417.com | www.68689f.com | www.073wy.com | www.320667.com | www.36166m.com | www.760320.com | www.50051z.com | www.c1981.com | www.022184.com | www.371q.cc | www.tcp969.com | www.6661d.cc | www.371951.com | www.47370.cc | www.587335.com | www.71233x.com | www.725660.com | www.77210c.com | www.708330.com | www.80767w.com | www.317299.com | www.66652c.com | www.658997.com | www.39500g.com | www.602927.com | www.82636.cc | www.326608.com | www.m.55xj.vip | www.040431.com | www.qucp8.com | www.54400z.com | www.857981.com | www.66332c.com | www.506906.com | www.9889hc.com | www.83993q.com | www.929709.com | www.66332s.com | www.377192.com | www.15czj.com | www.50054x.com | www.652862.com | www.3478o.cc | www.71233s.com | www.775709.com | www.5522l.cc | www.77210e.com | www.699494.com | www.2350i.com | www.57578d.com | www.603294.com | www.091wy.com | www.33588z.com | www.550973.com | www.jcai4.com | www.51515g.com | www.195237.com | www.803244.com | www.2109o.com | www.41518w.com | www.330605.com | www.848766.com | www.1888ac.com | www.97655j.com | www.275780.com | www.717228.com | www.5xcu.com | www.12455r.com | www.53900a.com | www.308069.com | www.lcw997.com | www.588yc.com | www.50051h.com | www.68568b.com | www.332807.com | www.luck887.com | www.hf5883.com | www.3552b.com | www.88065f.com | www.91233n.com | www.345839.com | www.642414.com | www.976931.com | www.006ac.com | www.13633.cc | www.68682h.com | www.50051d.com | www.89894c.com | www.279556.com | www.530534.com | www.690104.com | www.897296.com | www.ch8911.com | www.qj63.com | www.082wy.com | www.2408e.com | www.8816f.com | www.26163s.com | www.61233d.com | www.02500w.com | www.08588j.com | www.33997j.com | www.33598s.com | www.34788j.com | www.29277v.com | www.26163w.com | www.12455j.com | www.90305d.com | www.80065k.com | www.65707j.com | www.50064b.com | www.26299r.com | www.9478i.com | www.cll168.com | www.910xj.com | www.5ecp.com | www.cp994.com | www.899342.com | www.708609.com | www.551727.com | www.330291.com | www.068659.com | www.55228f.com | www.84499l.com | www.26299t.com | www.699by.com | www.ldfc8.com | www.fh7557.com | www.574177.com | www.196909.com | www.66332u.com | www.77114s.com | www.5086n.com | www.fcff6.com | www.783500.com | www.372918.com | www.77114k.com | www.60108m.com | www.664by.com | www.912193.com | www.yc7701.com | www.81520v.com | www.65707p.com | www.985jc.com | www.840774.com | www.327836.com | www.36788o.com | www.3890w.com | www.930155.com | www.hcw332.com | www.43131s.com | www.8499g.com | www.959557.com | www.346311.com | www.16878g.com | www.8000hc.com | www.xinyc6.com | www.77114p.com | www.16878k.com | www.932135.com | www.luck885.com | www.52303t.com | www.c1391.com | www.303766.com | www.61233b.com | www.983112.com | www.186763.com | www.igcp0.com | www.811257.com | www.96386g.com | www.3478r.cc | www.566897.com | www.12455i.com | www.c5237.com | www.136025.com | www.3552n.com | www.564846.com | www.77802f.com | www.904827.com | www.66332j.com | www.ya150.com | www.171109.com | www.3416b.com | www.451770.com | www.33598p.com | www.609717.com | www.68568t.com | www.717226.com | www.bxcp3.com | www.803241.com | www.26878g.com | www.856657.com | www.26163n.com | www.810629.com | www.33598g.com | www.813230.com | www.83033g.com | www.hcw266.com | www.39500d.com | www.517411.com | www.8499u.com | www.266991.com | www.688dl.com | www.81520g.com | www.987441.com | www.95333w.com | www.599643.com | www.781566.com | www.166125.com | www.c6093.com | www.12455e.com | www.602255.com | www.6832k.com | www.099323.com | www.500599a.com | www.281877.com | www.489800.com | www.66fft.com | www.36788x.com | www.560161.com | www.bxcp3333.com | www.43818g.com | www.580896.com | www.bxcp3333.com | www.41518a.com | www.lcw997.com | www.f093.com | www.68689d.com | www.234259.com | www.904862.com | www.5522y.cc | www.50788d.com | www.530891.com | www.hj7776.com | www.26878m.com | www.78949q.com | www.553079.com | www.c5617.com | www.66870.cc | www.52072n.com | www.388229.com | www.903079.com | www.910xj.com | www.71399z.com | www.99677v.com | www.544095.com | www.235387.com | www.hcw266.com | www.ldfc8.com | www.6832u.com | www.81233hh.com | www.083039.com | www.514177.com | www.847377.com | www.00ttz.com | www.8839b.com | www.00840e.com | www.84499a.com | www.330175.com | www.611874.com | www.914983.com | www.kc19.com | www.2109p.com | www.29277f.com | www.81678q.com | www.50026v.com | www.89894y.com | www.djcp004.com | www.433737.com | www.lcw199.com | www.755874.com | www.535666e.com | www.cf9902.com | www.sxyl3.com | www.53wcp.com | www.664by.com | www.995sj.com | www.2632j.com | www.5091u.com | www.5441y.com | www.9818v.cc | www.9928m.com | www.6364r.com | www.781566.com | www.565hc.com | www.060wy.com |