lith 4 vuotta sitten
vanhempi
commit
584d3ebb10
25 muutettua tiedostoa jossa 167 lisäystä ja 109 poistoa
  1. 19 0
      dotnet/Doc/Publish/pack sers_lib.bat
  2. 6 2
      dotnet/Doc/Publish/publish sers.bat
  3. 3 1
      dotnet/Gateway/App.Gateway/appsettings.json
  4. 1 1
      dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/DeliveryClient.cs
  5. 1 1
      dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/DeliveryServer.cs
  6. 1 1
      dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/DeliveryClient.cs
  7. 1 1
      dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/DeliveryServer.cs
  8. 2 2
      dotnet/Library/Sers/Sers.CL/Test/CommunicationManage/CmClient/appsettings.json
  9. 2 2
      dotnet/Library/Sers/Sers.CL/Test/CommunicationManage/CmServer/appsettings.json
  10. 11 1
      dotnet/Library/Vit/Vit.Core/Test/Vit.Core.MsTest/appsettings.json
  11. 7 1
      dotnet/Library/Vit/Vit.Core/Vit.Core/Module/Log/Extensions/LogMngExtensions.cs
  12. 16 15
      dotnet/Library/Vit/Vit.Core/Vit.Core/Module/Log/LogMng.cs
  13. 2 0
      dotnet/Library/Vit/Vit.WebHost/appsettings.json
  14. 3 1
      dotnet/ServiceCenter/App.Gover.Gateway/appsettings.json
  15. 5 3
      dotnet/ServiceCenter/App.ServiceCenter/appsettings.json
  16. 1 1
      dotnet/ServiceCenter/Sers.ServiceCenter/Apm/Sers.Gover.Apm.Zipkin/appsettings.json
  17. 3 1
      dotnet/ServiceStation/Demo/NetcoreLoader/Did.NetcoreLoader.Demo/appsettings.json
  18. 3 1
      dotnet/ServiceStation/Demo/NetcoreLoader/Did.NetcoreLoader.HelloWorld/appsettings.json
  19. 4 2
      dotnet/ServiceStation/Demo/SersLoader/Did.SersLoader.Demo/appsettings.json
  20. 1 1
      dotnet/ServiceStation/Demo/SersLoader/Did.SersLoader.HelloWorld/appsettings.json
  21. 63 61
      dotnet/ServiceStation/Demo/Serslot/Did.Serslot.Demo/appsettings.json
  22. 1 1
      dotnet/ServiceStation/Demo/Serslot/Did.Serslot.HelloWorld/Doc/Serslot之HelloWorld.md
  23. 6 6
      dotnet/ServiceStation/Demo/Serslot/Did.Serslot.HelloWorld/appsettings.json
  24. 4 2
      dotnet/ServiceStation/Demo/StressTest/App.Robot.Station/appsettings.json
  25. 1 1
      dotnet/ServiceStation/Ioc/App.Ioc.Station/appsettings.json

+ 19 - 0
dotnet/Doc/Publish/pack sers_lib.bat

@@ -9,6 +9,7 @@ echo 'pack Vit.Core'
 cd /d Vit\Vit.Core\Vit.Core
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\Doc\Publish\nuget 
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../
 
 
@@ -17,6 +18,7 @@ echo 'pack Vit.Net.Http.FormFile'
 cd /d Vit\Vit.Net.Http.FormFile
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget 
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../
 
 
@@ -24,6 +26,7 @@ echo 'pack Vit.WebHost'
 cd /d Vit\Vit.WebHost
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget 
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../
 
 
@@ -40,6 +43,7 @@ echo 'pack Sers.Hardware'
 cd /d Sers\Sers.Hardware\Sers.Hardware
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../ 
 
 
@@ -47,6 +51,7 @@ echo 'pack Sers.Core'
 cd /d Sers\Sers.Core\Sers.Core
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../  
 
 
@@ -56,18 +61,21 @@ echo 'pack Sers.CL.Ipc.NamedPipe'
 cd /d Sers\Sers.CL\Ipc\Sers.CL.Ipc.NamedPipe
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../../
 
 echo 'pack Sers.CL.Socket.Iocp'
 cd /d Sers\Sers.CL\Socket\Sers.CL.Socket.Iocp
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../../
 
 echo 'pack Sers.CL.Socket.ThreadWait'
 cd /d Sers\Sers.CL\Socket\Sers.CL.Socket.ThreadWait
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../../
 
 
@@ -75,6 +83,7 @@ echo 'pack Sers.CL.ClrZmq.ThreadWait'
 cd /d Sers\Sers.CL\Zmq\ThreadWait\Sers.CL.ClrZmq.ThreadWait
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../../../
 
 
@@ -82,6 +91,7 @@ echo 'pack Sers.CL.WebSocket'
 cd /d Sers\Sers.CL\WebSocket\Sers.CL.WebSocket
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../../
 
 
@@ -89,6 +99,7 @@ echo 'pack Sers.CL.Zmq.FullDuplex'
 cd /d Sers\Sers.CL\Zmq\FullDuplex\Sers.CL.Zmq.FullDuplex
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../../../
 
 
@@ -96,6 +107,7 @@ echo 'pack Sers.ServiceStation'
 cd /d Sers\Sers.ServiceStation\Sers.ServiceStation
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../ 
 
 
@@ -112,6 +124,7 @@ echo 'pack Sers.Gateway'
 cd /d Gateway\Sers.Gateway\Sers.Gateway
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../
 
 
@@ -128,6 +141,7 @@ echo 'pack Sers.ServiceCenter'
 cd /d ServiceCenter\Sers.ServiceCenter\Sers.ServiceCenter
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../
 
 
@@ -136,6 +150,7 @@ echo 'pack Sers.Gover'
 cd /d ServiceCenter\Sers.ServiceCenter\Sers.Gover
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../
 
 
@@ -151,6 +166,7 @@ echo 'pack Vit.Ioc'
 cd /d ServiceStation\Ioc\Vit.Ioc\Vit.Ioc
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../../
 
 
@@ -160,6 +176,7 @@ echo 'pack Sers.Ioc'
 cd /d ServiceStation\Ioc\Sers.Ioc\Sers.Ioc
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../../
 
 
@@ -172,6 +189,7 @@ echo 'pack Sers.Serslot'
 cd /d ServiceStation\ApiLoader\Sers.Serslot
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../  
 
 
@@ -179,6 +197,7 @@ echo 'pack Sers.NetcoreLoader'
 cd /d ServiceStation\ApiLoader\Sers.NetcoreLoader
 dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\..\Doc\Publish\nuget
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../  
  
 

+ 6 - 2
dotnet/Doc/Publish/publish sers.bat

@@ -4,20 +4,22 @@ echo 'publish Gateway'
 cd /d Gateway\App.Gateway
 dotnet build --configuration Release
 dotnet publish --configuration Release --output ..\..\Doc\Publish\SersPublish\Gateway 
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../
-
-
+ 
  
 echo 'publish Gover'
 cd /d ServiceCenter\App.Gover.Gateway
 dotnet build --configuration Release
 dotnet publish --configuration Release --output ..\..\Doc\Publish\SersPublish\Gover 
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../
  
 echo 'publish ServiceCenter'
 cd /d ServiceCenter\App.ServiceCenter
 dotnet build --configuration Release
 dotnet publish --configuration Release --output ..\..\Doc\Publish\SersPublish\ServiceCenter
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../
 
 
@@ -28,6 +30,7 @@ echo 'publish Demo'
 cd /d ServiceStation\Demo\SersLoader\Did.SersLoader.Demo
 dotnet build --configuration Release
 dotnet publish --configuration Release --output ..\..\..\..\Doc\Publish\SersPublish\Demo
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../../
 
 
@@ -35,6 +38,7 @@ echo 'publish Robot'
 cd /d ServiceStation\Demo\StressTest\App.Robot.Station
 dotnet build --configuration Release
 dotnet publish --configuration Release --output ..\..\..\..\Doc\Publish\SersPublish\Robot
+@if errorlevel 1 (echo . & echo .  & echo 出错,请排查!& pause) 
 cd /d ../../../../
 
 

+ 3 - 1
dotnet/Gateway/App.Gateway/appsettings.json

@@ -11,7 +11,7 @@
           "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
 
           /* (x.2) conn config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501,
@@ -156,6 +156,8 @@
 
     /* 日志配置,可不指定 */
     "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
       /* print the log to console. default:false  */
       "PrintToConsole": true
     },

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/DeliveryClient.cs

@@ -53,7 +53,7 @@ namespace Sers.CL.Socket.Iocp
 
 
         /// <summary>
-        ///  服务端 host地址(默认 "127.0.0.1" )。例如: "127.0.0.1"、"sers.com"。
+        ///  服务端 host地址(默认 "127.0.0.1" )。例如: "127.0.0.1"、"sers.cloud"。
         /// </summary>
         public string host = "127.0.0.1";
         /// <summary>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/DeliveryServer.cs

@@ -19,7 +19,7 @@ namespace Sers.CL.Socket.Iocp
         public Sers.Core.Util.StreamSecurity.SecurityManager securityManager;
 
         /// <summary>
-        /// 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.com"。
+        /// 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。
         /// </summary>
         public string host = null;
         /// <summary>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/DeliveryClient.cs

@@ -24,7 +24,7 @@ namespace Sers.CL.Socket.ThreadWait
 
 
         /// <summary>
-        /// 服务端 host地址(默认 "127.0.0.1")。例如: "127.0.0.1"、"sers.com"。
+        /// 服务端 host地址(默认 "127.0.0.1")。例如: "127.0.0.1"、"sers.cloud"。
         /// </summary>
         public string host = "127.0.0.1";
         /// <summary>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/DeliveryServer.cs

@@ -18,7 +18,7 @@ namespace Sers.CL.Socket.ThreadWait
         public Sers.Core.Util.StreamSecurity.SecurityManager securityManager;
 
         /// <summary>
-        /// 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.com"。
+        /// 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。
         /// </summary>
         public string host = null;
         /// <summary>

+ 2 - 2
dotnet/Library/Sers/Sers.CL/Test/CommunicationManage/CmClient/appsettings.json

@@ -50,7 +50,7 @@
 
 
           /* (x.2) config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           //"host": "192.168.10.11",
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
@@ -66,7 +66,7 @@
           //"className": "Sers.CL.Socket.ThreadWait.OrganizeClientBuilder",
 
           /* (x.2) config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501

+ 2 - 2
dotnet/Library/Sers/Sers.CL/Test/CommunicationManage/CmServer/appsettings.json

@@ -47,7 +47,7 @@
 
 
           /* (x.2) config */
-          /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.com"。*/
+          /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。*/
           //"host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501
@@ -62,7 +62,7 @@
 
 
           /* (x.2) config */
-          /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.com"。*/
+          /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。*/
           //"host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501

+ 11 - 1
dotnet/Library/Vit/Vit.Core/Test/Vit.Core.MsTest/appsettings.json

@@ -1,5 +1,15 @@
 {
-   
+  /* Vit工具配置,可不指定 */
+  "Vit": {
+
+    /* 日志配置,可不指定 */
+    "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
+      /* print the log to console. default:false  */
+      "PrintToConsole": true
+    }
+  },
 
   "Test": {
 

+ 7 - 1
dotnet/Library/Vit/Vit.Core/Vit.Core/Module/Log/Extensions/LogMngExtensions.cs

@@ -9,9 +9,15 @@ namespace Vit.Extensions
 
         public static void InitByConfigurationManager(this LogMng data)
         {
+            if (false != ConfigurationManager.Instance.GetByPath<bool?>("Vit.Logger.PrintToTxt"))
+            {
+                Logger.OnLog += Logger.log.LogTxt;
+            }
+
+
             if (true == ConfigurationManager.Instance.GetByPath<bool?>("Vit.Logger.PrintToConsole"))
             {
-                Logger.OnLog = (level, msg)=> { Console.WriteLine("[" + level + "]" + DateTime.Now.ToString("[HH:mm:ss.ffff]") + msg);   };
+                Logger.OnLog += (level, msg)=> { Console.WriteLine("[" + level + "]" + DateTime.Now.ToString("[HH:mm:ss.ffff]") + msg);   };
             }
         }
 

+ 16 - 15
dotnet/Library/Vit/Vit.Core/Vit.Core/Module/Log/LogMng.cs

@@ -11,8 +11,19 @@ namespace Vit.Core.Module.Log
     /// </summary>
     public class LogMng
     {
-        #region private
+        #region LogTxt
+        public string NewLine = Environment.NewLine;
 
+        public void LogTxt(Level level, string message)
+        {
+            //加锁 以避免多线程抢占文件错误
+            // IOException: The process cannot access the file 'file path' because it is being used by another process
+
+            string finalMsg = DateTime.Now.ToString("[HH:mm:ss.ffff]") + message + NewLine;
+            string filePath = GetLogPath(level);
+            lock (filePath)
+                File.AppendAllText(filePath, finalMsg);
+        }
 
 
         #region class LogFilePathCache
@@ -90,16 +101,6 @@ namespace Vit.Core.Module.Log
         
 
 
-        public void LogTxt(Level level, string message)
-        {
-            //加锁 以避免多线程抢占文件错误
-            // IOException: The process cannot access the file 'file path' because it is being used by another process
-
-            string finalMsg = DateTime.Now.ToString("[HH:mm:ss.ffff]") + message + Environment.NewLine;
-            string filePath = GetLogPath(level);
-            lock (filePath)
-                File.AppendAllText(filePath, finalMsg);
-        }
 
 
         #endregion
@@ -114,7 +115,7 @@ namespace Vit.Core.Module.Log
         {
             try
             {              
-                LogTxt(level, message);
+                //LogTxt(level, message);
                 OnLog?.Invoke(level, message);
             }
             catch { }
@@ -189,8 +190,8 @@ namespace Vit.Core.Module.Log
                 ex = ex.GetBaseException();
                 var ssError = ex.ToSsError().Serialize();
                 //if (!string.IsNullOrWhiteSpace(ssError))
-                strMsg += Environment.NewLine + " ssError:" + ssError;
-                strMsg += Environment.NewLine + " StackTrace:" + ex.StackTrace;
+                strMsg += NewLine + " ssError:" + ssError;
+                strMsg += NewLine + " StackTrace:" + ex.StackTrace;
             }
             Error(strMsg);
         }
@@ -212,7 +213,7 @@ namespace Vit.Core.Module.Log
         public void Error(string message, SsError ssError)
         {
             var strMsg = "";
-            if (!string.IsNullOrWhiteSpace(message)) strMsg += " message:" + message + Environment.NewLine;
+            if (!string.IsNullOrWhiteSpace(message)) strMsg += " message:" + message + NewLine;
             if (null != ssError)
             {
                 strMsg += " ssError:" + ssError.Serialize();

+ 2 - 0
dotnet/Library/Vit/Vit.WebHost/appsettings.json

@@ -54,6 +54,8 @@
 
     /* 日志配置,可不指定 */
     "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
       /* print the log to console. default:false  */
       "PrintToConsole": true
     },

+ 3 - 1
dotnet/ServiceCenter/App.Gover.Gateway/appsettings.json

@@ -11,7 +11,7 @@
           "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
 
           /* (x.2) conn config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501,
@@ -156,6 +156,8 @@
 
     /* 日志配置,可不指定 */
     "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
       /* print the log to console. default:false  */
       "PrintToConsole": true
     },

+ 5 - 3
dotnet/ServiceCenter/App.ServiceCenter/appsettings.json

@@ -69,7 +69,7 @@
 
 
           /* (x.2) config */
-          /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.com"。*/
+          /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。*/
           //"host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501
@@ -82,7 +82,7 @@
 
 
           /* (x.2) config */
-          /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.com"。*/
+          /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。*/
           //"host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501
@@ -366,7 +366,7 @@
 
         /* 配置 */
         "SamplingRate": "1.0",
-        "zipkinCollectorUrl": "http://do.sers.com:9411",
+        "zipkinCollectorUrl": "http://sers.cloud:9411",
 
         /* 若不指定则默认为ServiceCenter */
         "rpcName": "ServiceCenter",
@@ -509,6 +509,8 @@
 
     /* 日志配置,可不指定 */
     "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
       /* print the log to console. default:false  */
       "PrintToConsole": true
     },

+ 1 - 1
dotnet/ServiceCenter/Sers.ServiceCenter/Apm/Sers.Gover.Apm.Zipkin/appsettings.json

@@ -13,7 +13,7 @@
 
         /* 配置 */
         "SamplingRate": "1.0",
-        "zipkinCollectorUrl": "http://do.sers.com:9411",
+        "zipkinCollectorUrl": "http://sers.cloud:9411",
 
         /* 若不指定则默认为ServiceCenter */
         "rpcName": "ServiceCenter",

+ 3 - 1
dotnet/ServiceStation/Demo/NetcoreLoader/Did.NetcoreLoader.Demo/appsettings.json

@@ -25,7 +25,7 @@
           "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
 
           /* (x.2) conn config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501,
@@ -76,6 +76,8 @@
 
     /* 日志配置,可不指定 */
     "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
       /* print the log to console. default:false  */
       "PrintToConsole": true
     }

+ 3 - 1
dotnet/ServiceStation/Demo/NetcoreLoader/Did.NetcoreLoader.HelloWorld/appsettings.json

@@ -18,7 +18,7 @@
           "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
 
           /* (x.2) conn config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501,
@@ -69,6 +69,8 @@
 
     /* 日志配置,可不指定 */
     "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
       /* print the log to console. default:false  */
       "PrintToConsole": true
     }

+ 4 - 2
dotnet/ServiceStation/Demo/SersLoader/Did.SersLoader.Demo/appsettings.json

@@ -73,7 +73,7 @@
 
 
           /* (x.2) config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501
@@ -86,7 +86,7 @@
           //"className": "Sers.CL.Socket.ThreadWait.OrganizeClientBuilder",
 
           /* (x.2) config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501
@@ -330,6 +330,8 @@
 
     /* 日志配置,可不指定 */
     "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
       /* print the log to console. default:false  */
       "PrintToConsole": true
     },

+ 1 - 1
dotnet/ServiceStation/Demo/SersLoader/Did.SersLoader.HelloWorld/appsettings.json

@@ -11,7 +11,7 @@
           "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
 
           /* (x.2) conn config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501,

+ 63 - 61
dotnet/ServiceStation/Demo/Serslot/Did.Serslot.Demo/appsettings.json

@@ -1,6 +1,6 @@
 {
 
-  /* asp.net core ԭʼweb�������� */
+  /* asp.net core 原始web服务配置 */
   "server": {
     "urls": [ "http://localhost:4513" ]
   },
@@ -15,7 +15,7 @@
 
 
   "Sers": {
-    /* ͨѶ������ */
+    /* 通讯层配置 */
     "CL": {
       /* one conn is one channel.can be multiable */
       "Client": [
@@ -26,130 +26,130 @@
           "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
 
           /* (x.2) conn config */
-          /* ����� host��ַ�����磺 "127.0.0.1"��"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
-          /* ����� �����˿ںš����磺 4501 */
+          /* 服务端 监听端口号。例如: 4501 */
           "port": 4501,
 
 
-          /* ������Կ��������֤���Ӱ�ȫ�ԡ�����˺Ϳͻ��˱���һ�� */
+          /* 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 */
           "secretKey": "SersCL"
         }
       ]
     },
 
 
-    /* LocalApiService ����,�ɲ�ָ�� */
+    /* LocalApiService 配置,可不指定 */
     "LocalApiService": {
 
-      /* ��̨������̸߳�������λ����Ĭ��0,������������ */
+      /* 后台服务的线程个数(单位个,默认0,代表不开启服务) */
       "workThreadCount": 4,
 
 
-      /* ��ʱʱ�䣬���ָ�����̨����������ʱ���������رճ�����ʱ�������,ʵ������ǿ�ƹرյ�ʱ�����1����ʱʱ�䵽2����ʱʱ����)����λ��ms��*/
+      /* 超时时间,若不指定则后台任务永不超时。(主动关闭超过此时间的任务,实际任务强制关闭的时间会在1倍超时时间到2倍超时时间内)。单位:ms。*/
       //"timeout_ms": 10000,
 
 
-      /* �Ƿ� �������Api�ĵ�����Ϣ����ApiTrace��Log�ļ���Ĭ��:false */
+      /* 是否 输出本地Api的调用信息到(ApiTrace)Log文件。默认:false */
       "PrintTrace": false,
 
 
-      /* ��̬�ļ�ӳ������ӳ��վ�㾲̬�ļ����ɶ��,�ɲ�ָ�� */
+      /* 静态文件映射器。映射站点静态文件,可多个,可不指定 */
       "//staticFiles": [
         {
-          /* api·��ǰ׺������ "/demo/ui/*" */
+          /* api路由前缀,例如 "/demo/ui/*" */
           "route": "/demo/ui/*",
-          /* api��������̬�ļ����� */
-          "apiName": "demoվ�㾲̬�ļ�",
+          /* api描述,静态文件描述 */
+          "apiName": "demo站点静态文件",
 
 
-          /* ��̬�ļ�·������Ϊ���·�������·������Ϊ�ջ���ַ�����Ĭ��Ϊ��ڳ�������Ŀ¼��demo:"wwwroot/demo" */
+          /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则默认为入口程序所在目录。demo:"wwwroot/demo" */
           "rootPath": "wwwroot/demo",
 
-          /* ��̬�ļ�����ӳ�����õ��ļ�·������Ϊ���·�������·��������"contentTypeMap.json"�����ָ������ָ�����ļ������ڣ���ָ���ļ�����ӳ������ */
+          /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
           "contentTypeMapFile": "contentTypeMap.json",
 
-          /* ��Ӧ��̬�ļ�ʱ������ӵ�http��Ӧͷ���ɲ�ָ���� */
+          /* 回应静态文件时额外添加的http回应头。可不指定。 */
           "responseHeaders": {
 
-            //�����������̬�ļ�����3600��
+            //设置浏览器静态文件缓存3600秒
             "Cache-Control": "public,max-age=3600"
           }
         }
       ],
 
 
-      /* Ĭ��վ�����ƣ��ɶ��,�ɲ�ָ�� */
+      /* 默认站点名称,可多个,可不指定 */
       //"apiStationNames": [ "demo" ],
 
-      /* Api���������� */
+      /* Api加载器配置 */
       "//ApiLoaders": [
         {
-          /* �ڴ�Assembly�в���api������(�� Sers.Core.dll ��Sers.NetcoreLoader.dll �� Sers.Serslot.dll ) */
+          /* 在此Assembly中查找api加载器(如 Sers.Core.dll 、Sers.NetcoreLoader.dll 、 Sers.Serslot.dll ) */
           //"loader_assemblyFile": "Sers.Core.dll",
-          /* ����������������Ϊ Sers.SersLoader.ApiLoader �� Sers.NetcoreLoader.ApiLoader�� Sers.Serslot.ApiLoader �ȡ����ָ����Ĭ��Ϊ"Sers.SersLoader.ApiLoader" */
+          /* 加载器的类名,可为 Sers.SersLoader.ApiLoader 、 Sers.NetcoreLoader.ApiLoader、 Sers.Serslot.ApiLoader 等。若不指定则默认为"Sers.SersLoader.ApiLoader" */
           //"loader_className": "Sers.SersLoader.ApiLoader",
 
 
-          //��ͨ������Ӵ˰��л�ȡҪ���ص�api��
-          /* �ڴ�Assembly�в��ҷ���(�� Did.SersLoader.Demo.dll)(assembly��assemblyFile��assemblyName ָ����һ����) */
+          //(通过反射从此包中获取要加载的api)
+          /* 在此Assembly中查找服务(如 Did.SersLoader.Demo.dll)(assembly、assemblyFile、assemblyName 指定任一即可) */
           "assemblyFile": "Did.SersLoader.Demo.dll",
 
-          /* �ڴ�Assembly�в��ҷ���(�� Did.SersLoader.Demo)(assembly��assemblyFile��assemblyName ָ����һ����) */
+          /* 在此Assembly中查找服务(如 Did.SersLoader.Demo)(assembly、assemblyFile、assemblyName 指定任一即可) */
           //"assemblyName": "Did.SersLoader.Demo",
 
 
-          /* ǿ��ָ��ApiStation���ơ��ɲ�ָ���������ȼ��Ӹߵ��ͣ�  apiStationName_Force �� �ڴ����ϵ�SsStationNameAttribute����ָ�� �� apiStationName �� appsettings.jsonָ���� */
+          /* 强制指定ApiStation名称。可不指定。(优先级从高到低:  apiStationName_Force 、 在代码上的SsStationNameAttribute特性指定 、 apiStationName 、 appsettings.json指定) */
           //"apiStationName_Force": "",
 
-          /* ApiStation���ơ��ɲ�ָ���������ȼ��Ӹߵ��ͣ�  apiStationName_Force �� �ڴ����ϵ�SsStationNameAttribute����ָ�� �� apiStationName �� appsettings.jsonָ���� */
+          /* ApiStation名称。可不指定。(优先级从高到低:  apiStationName_Force 、 在代码上的SsStationNameAttribute特性指定 、 apiStationName 、 appsettings.json指定) */
           "apiStationName": "demo"
 
 
-          /* ǿ��·��ǰ׺,���磺"demo/v1"���ɲ�ָ���������ȼ��Ӹߵ��ͣ�  routePrefix_Force���ڴ����ϵ�SsRoutePrefixAttribute����ָ�� �� routePrefix�� */
+          /* 强制路由前缀,例如:"demo/v1"。可不指定。(优先级从高到低:  routePrefix_Force、在代码上的SsRoutePrefixAttribute特性指定 、 routePrefix) */
           //"routePrefix_Force": "",
 
-          /* ·��ǰ׺,���磺"demo/v1"���ɲ�ָ���������ȼ��Ӹߵ��ͣ�  routePrefix_Force���ڴ����ϵ�SsRoutePrefixAttribute����ָ�� �� routePrefix �� */
+          /* 路由前缀,例如:"demo/v1"。可不指定。(优先级从高到低:  routePrefix_Force、在代码上的SsRoutePrefixAttribute特性指定 、 routePrefix ) */
           //"routePrefix": ""
         }
       ],
 
 
-      /* ����Apiʱ���Զ���Scope���󡣿ɲ�ָ�����¼�˳��Ϊ  OnCreateScope -> BeforeCallApi -> OnDispose */
+      /* 调用Api时的自定义Scope对象。可不指定。事件顺序为  OnCreateScope -> BeforeCallApi -> OnDispose */
       "//OnCreateScope": [
         {
-          /* �ڴ�Assembly�м����� */
+          /* 在此Assembly中加载类 */
           "assemblyFile": "Sers.ApiTrace.dll",
-          /* ��̬���ص�����������̳нӿ� Sers.Core.Module.Api.ApiEvent.ApiScope.IApiScope */
+          /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.ApiScope.IApiScope */
           "className": "Sers.ApiTrace.ApiScope"
         }
       ],
 
-      /* ����apiǰ���¼����ɲ�ָ�����¼�˳��Ϊ  OnCreateScope -> BeforeCallApi -> OnDispose */
+      /* 调用api前的事件,可不指定。事件顺序为  OnCreateScope -> BeforeCallApi -> OnDispose */
       "//BeforeCallApi": [
         {
-          /* �ڴ�Assembly�м����� */
+          /* 在此Assembly中加载类 */
           //"assemblyFile": "Sers.Core.dll",
-          /* ��̬���ص�����������̳нӿ� Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
+          /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
           "className": "Bearer",
-          //Bearer: �ڵ��ýӿ�ǰ�����ȡ rpcData.http.headers.Authorization(��ʽΪ "Bearer xxxxxx")������Ϊ�������ýӿ�api_verifyAt���ѷ������ݷŵ� rpcData.user.userInfo
+          //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
 
-          /* ��֤at�ӿڵĵ�ַ */
+          /* 验证at接口的地址 */
           "api_verifyAt": "/AuthCenter/account/verifyAt",
-          /* ��֤at�ӿڵ�httpMethod��(�� GET POST �ɲ�ָ��) */
+          /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
           "api_httpMethod": "POST"
         },
 
         {
-          //AccountInCookie �ڵ��ýӿ�ǰ�����ȡ rpcData.http.headers.Cookie(��ʽΪ "user=xxx;c=7")�е�user�����˺��б��бȶ�userToken����д CallerSource(rpcData.caller.source) �� userInfo(rpcData.user.userInfo)
+          //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
           "className": "AccountInCookie",
           "account": [
             {
               "userToken": "admin_123456",
               //"CallerSource": "Internal",
               "userInfo": {
-                "name": "��������Ա",
-                "���": "Gover����"
+                "name": "超级管理员",
+                "入口": "Gover网关"
               }
             }
           ]
@@ -158,49 +158,51 @@
     },
 
 
-    /* ServiceStation����,�ɲ�ָ�� */
+    /* ServiceStation配置,可不指定 */
     "ServiceStation": {
 
-      /* �Զ��ϱ�cpu Usage����ָ�����ϱ� */
+      /* 自动上报cpu Usage。不指定则不上报 */
       "//UsageReporter": {
-        /* �ϱ�ʱ�������λ���룩 */
+        /* 上报时间间隔(单位:秒) */
         "intervalSecond": 2
       },
 
 
-      /* ��������ע�����á������������ע��վ��ǰ �Ƿ��ӡ��Logger.Info�����������Ĭ��:false */
+      /* 服务中心注册配置。在向服务中心注册站点前 是否打印(Logger.Info)请求参数。默认:false */
       "StationRegist_PrintRegistArg": false,
 
 
-      /* serviceStationվ����Ϣ */
+      /* serviceStation站点信息 */
       "serviceStationInfo": {
         "serviceStationName": "SerslotDemo",
 
-        /* ����վ��汾��Ϣ,���ָ����Ϊ������ӿ�İ汾�� */
+        /* 服务站点版本信息,若不指定则为入口链接库的版本号 */
         //"stationVersion": "1.1.9.0",
 
-        /* [json]����վ�������Ϣ,�ɲ�ָ�� */
+        /* [json]服务站点额外信息,可不指定 */
         "info": null
       }
     }
   },
 
-  /* Vit�������ã��ɲ�ָ�� */
+  /* Vit工具配置,可不指定 */
   "Vit": {
 
-    /* ��־����,�ɲ�ָ�� */
+    /* 日志配置,可不指定 */
     "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
       /* print the log to console. default:false  */
       "PrintToConsole": true
     },
 
 
-    /* ���л����ã��ɲ�ָ�� */
+    /* 序列化配置,可不指定 */
     "Serialization": {
-      /* ���л��ַ����롣�ɲ�ָ����Ĭ�� UTF8��ֻ��Ϊ UTF7,UTF8,UTF32,ASCII,Unicode�� */
+      /* 序列化字符编码。可不指定,默认 UTF8。只可为 UTF7,UTF8,UTF32,ASCII,Unicode。 */
       "Encoding": "UTF8",
 
-      /* ʱ�����л���ʽ���ɲ�ָ����Ĭ�� "yyyy-MM-dd HH:mm:ss" */
+      /* 时间序列化格式。可不指定,默认 "yyyy-MM-dd HH:mm:ss" */
       "DateTimeFormat": "yyyy-MM-dd HH:mm:ss"
     }
   },
@@ -208,26 +210,26 @@
 
   "serslot": {
 
-    /* ����api��SsApiDesc��ʽ������ϵͳapi�⣬����ָ������api����ָ���������ݣ�reply��,��ֱ�ӷ������ݣ����ָ���������ݣ�����host���д��� */
+    /* 额外api。SsApiDesc格式。除了系统api外,可以指定额外api。若指定返回数据(reply),则直接返回数据;若不指定返回数据,则由host进行处理 */
     "//extApi": [
-      { //Ϊ SsApiDesc��ʽ
-        "description": "��ҳ",
-        //·��(��Ϊ���ӿ�,�� "/a/*" )
+      { //为 SsApiDesc格式
+        "description": "首页",
+        //路由(可为泛接口,如 "/a/*" )
         "route": "/index.html",
-        //��չ���ã�json��
+        //扩展配置(json)
         "extendConfig": {
-          //����ʽ�����ָ����Ĭ��֧�����з�ʽ��demo: POST��GET��DELETE��PUT�ȣ�
+          //请求方式,若不指定则默认支持所有方式(demo: POST、GET、DELETE、PUT等)
           "httpMethod": "GET",
 
-          //�������ݣ���Ϊ��ֵ���ַ������������飩�����ָ��������host���д���
+          //返回数据(可为数值、字符串、对象、数组)。若不指定,则由host进行处理
           "reply": { "hello": "sers" },
 
-          //ϵͳ���ɵĽӿ���������
+          //系统生成的接口文字描述
           "sysDesc": "method:GET"
         }
       },
       {
-        //·��(��Ϊ���ӿ�,�� "/a/*" )
+        //路由(可为泛接口,如 "/a/*" )
         "route": "/*"
       }
 

+ 1 - 1
dotnet/ServiceStation/Demo/Serslot/Did.Serslot.HelloWorld/Doc/Serslot之HelloWorld.md

@@ -66,7 +66,7 @@ namespace SerslotDemo
           "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
 
           /* (x.2) conn config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501,

+ 6 - 6
dotnet/ServiceStation/Demo/Serslot/Did.Serslot.HelloWorld/appsettings.json

@@ -1,6 +1,6 @@
 {
   "Sers": {
-    /* ͨѶ������ */
+    /* 通讯层配置 */
     "CL": {
       /* one conn is one channel.can be multiable */
       "Client": [
@@ -11,19 +11,19 @@
           "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
 
           /* (x.2) conn config */
-          /* ����� host��ַ�����磺 "127.0.0.1"��"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
-          /* ����� �����˿ںš����磺 4501 */
+          /* 服务端 监听端口号。例如: 4501 */
           "port": 4501,
-          /* ������Կ��������֤���Ӱ�ȫ�ԡ�����˺Ϳͻ��˱���һ�� */
+          /* 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 */
           "secretKey": "SersCL"
         }
       ]
     },
 
-    /* LocalApiService ����,�ɲ�ָ�� */
+    /* LocalApiService 配置,可不指定 */
     "LocalApiService": {
-      /* ��̨������̸߳�������λ����Ĭ��0,������������ */
+      /* 后台服务的线程个数(单位个,默认0,代表不开启服务) */
       "workThreadCount": 16
     }
   },

+ 4 - 2
dotnet/ServiceStation/Demo/StressTest/App.Robot.Station/appsettings.json

@@ -61,7 +61,7 @@
 
 
           /* (x.2) config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501
@@ -74,7 +74,7 @@
           //"className": "Sers.CL.Socket.ThreadWait.OrganizeClientBuilder",
 
           /* (x.2) config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501
@@ -191,6 +191,8 @@
 
     /* 日志配置,可不指定 */
     "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
       /* print the log to console. default:false  */
       "PrintToConsole": true
     }

+ 1 - 1
dotnet/ServiceStation/Ioc/App.Ioc.Station/appsettings.json

@@ -11,7 +11,7 @@
           "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
 
           /* (x.2) conn config */
-          /* 服务端 host地址。例如: "127.0.0.1"、"sers.com" */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
           "host": "127.0.0.1",
           /* 服务端 监听端口号。例如: 4501 */
           "port": 4501,