Commit d6bae970 LN

1

1 个父辈 35d2f044
...@@ -75,7 +75,7 @@ namespace OnlineStore.Common ...@@ -75,7 +75,7 @@ namespace OnlineStore.Common
} }
return true; return true;
} }
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); //public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static string Post(string url, string paramData, int timeOut = 5000) public static string Post(string url, string paramData, int timeOut = 5000)
{ {
bool IsTimeOut = false; bool IsTimeOut = false;
...@@ -99,7 +99,7 @@ namespace OnlineStore.Common ...@@ -99,7 +99,7 @@ namespace OnlineStore.Common
IsTimeOut = false; IsTimeOut = false;
if (isLog == 1) if (isLog == 1)
{ {
LOGGER.Info("给服务器发送数据【"+url+"】【" + paramData + "】 "); LogUtil.info("给服务器发送数据【"+url+"】【" + paramData + "】 ");
} }
string result = ""; string result = "";
...@@ -134,7 +134,7 @@ namespace OnlineStore.Common ...@@ -134,7 +134,7 @@ namespace OnlineStore.Common
} }
if (isLog == 1) if (isLog == 1)
{ {
LOGGER.Info("收到服务器数据【" + result + "】"); LogUtil.info("收到服务器数据【" + result + "】");
} }
return result; return result;
} }
...@@ -148,13 +148,13 @@ namespace OnlineStore.Common ...@@ -148,13 +148,13 @@ namespace OnlineStore.Common
{ {
try try
{ {
LogUtil.info(LOGGER, "HTTP GET FROM: " + url); LogUtil.info( "HTTP GET FROM: " + url);
var wc = new WebClient { Encoding = encoding }; var wc = new WebClient { Encoding = encoding };
var readStream = wc.OpenRead(url); var readStream = wc.OpenRead(url);
using (var sr = new StreamReader(readStream, encoding)) using (var sr = new StreamReader(readStream, encoding))
{ {
var result = sr.ReadToEnd(); var result = sr.ReadToEnd();
LogUtil.info(LOGGER, "receive << " + result); LogUtil.info( "receive << " + result);
return result; return result;
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!