Sfoglia il codice sorgente

修改RPC示例日志输出

Shun 2 anni fa
parent
commit
aa326a434e

+ 1 - 1
src/YSAI.RPC.Client.Samples/Program.cs

@@ -26,7 +26,7 @@ while (true)
     //创建
     IHello hello = rpcClient.Create<IHello>();
     hello.Kitty(new Test { aaaa = "客户端 => 服务端", bbbb = DateTime.Now.ToDateTimeString() });
-    Console.WriteLine(hello.Get());
+    LogHelper.Info(hello.Get());
 }
 
 

+ 5 - 4
src/YSAI.RPC.Service.Samples/Program.cs

@@ -1,4 +1,5 @@
-using YSAI.Rpc.service;
+using YSAI.Log;
+using YSAI.Rpc.service;
 using YSAI.Unility;
 
 
@@ -18,7 +19,7 @@ RpcService rpvService = RpcService.Instance(new YSAI.Rpc.data.Service.Basics
                 }
 });
 
-Console.WriteLine(rpvService.Open().ToJson().JsonFormatting());
+LogHelper.Info(rpvService.Open().ToJson().JsonFormatting());
 
 //注册
 rpvService.Register<IHello, hello>();
@@ -30,7 +31,7 @@ while (true)
     //创建
     IHello hello = rpvService.Create<IHello>();
     hello.Kitty(new Test { aaaa = "服务端 => 客户端", bbbb = DateTime.Now.ToDateTimeString() });
-    Console.WriteLine(hello.Get());
+    LogHelper.Info(hello.Get());
 }
 
 
@@ -56,7 +57,7 @@ public class hello : IHello
 
     public void Kitty(Test test)
     {
-        Console.WriteLine(test.ToJson().JsonFormatting());
+        LogHelper.Info(test.ToJson().JsonFormatting());
     }
 }
 public class hello2 : IHello