增加日志打印

This commit is contained in:
2026-01-28 16:00:27 +08:00
parent 2308aee42f
commit b0cb5f7bd5
4 changed files with 20 additions and 2 deletions

View File

@@ -1,10 +1,12 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 18
VisualStudioVersion = 15.0.28307.1622 VisualStudioVersion = 18.0.11222.15 d18.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWebSocket", "TestWebSocket\TestWebSocket.csproj", "{3B29DA63-7818-4C39-969A-19CB471B3CC9}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWebSocket", "TestWebSocket\TestWebSocket.csproj", "{3B29DA63-7818-4C39-969A-19CB471B3CC9}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{B057DD31-B34E-46F6-8808-8C31F7474F12}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
{3B29DA63-7818-4C39-969A-19CB471B3CC9}.Debug|Any CPU.Build.0 = Debug|Any CPU {3B29DA63-7818-4C39-969A-19CB471B3CC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B29DA63-7818-4C39-969A-19CB471B3CC9}.Release|Any CPU.ActiveCfg = Release|Any CPU {3B29DA63-7818-4C39-969A-19CB471B3CC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B29DA63-7818-4C39-969A-19CB471B3CC9}.Release|Any CPU.Build.0 = Release|Any CPU {3B29DA63-7818-4C39-969A-19CB471B3CC9}.Release|Any CPU.Build.0 = Release|Any CPU
{B057DD31-B34E-46F6-8808-8C31F7474F12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B057DD31-B34E-46F6-8808-8C31F7474F12}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B057DD31-B34E-46F6-8808-8C31F7474F12}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B057DD31-B34E-46F6-8808-8C31F7474F12}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@@ -29,6 +29,7 @@ using System.Runtime.CompilerServices;
using System.Messaging; using System.Messaging;
using System.Web.UI.WebControls.WebParts; using System.Web.UI.WebControls.WebParts;
using System.Net.Http; using System.Net.Http;
using Common;
namespace TestWebSocket namespace TestWebSocket
{ {
@@ -147,6 +148,8 @@ namespace TestWebSocket
while (true) while (true)
{ {
Console.WriteLine("write Redis Now time");
CSRedisCacheHelper.Set("LastWebCmdTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), 5);
Message msgRx = mq.Receive(); Message msgRx = mq.Receive();
msgRx.Formatter = new XmlMessageFormatter(new Type[] { typeof(string) }); msgRx.Formatter = new XmlMessageFormatter(new Type[] { typeof(string) });
string strRx = msgRx.Body.ToString(); string strRx = msgRx.Body.ToString();

View File

@@ -73,6 +73,9 @@
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942"> <Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath> <HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
</Reference> </Reference>
<Reference Include="CSRedisCore, Version=3.8.807.0, Culture=neutral, PublicKeyToken=9aa6a3079358d437, processorArchitecture=MSIL">
<HintPath>..\packages\CSRedisCore.3.8.807\lib\net45\CSRedisCore.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath> <HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference> </Reference>
@@ -130,6 +133,9 @@
</Reference> </Reference>
<Reference Include="System.Security" /> <Reference Include="System.Security" />
<Reference Include="System.Transactions" /> <Reference Include="System.Transactions" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
@@ -146,6 +152,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="BLL.cs" /> <Compile Include="BLL.cs" />
<Compile Include="CSRedisCacheHelper.cs" />
<Compile Include="devicemanage.cs" /> <Compile Include="devicemanage.cs" />
<Compile Include="devicestatushistory.cs" /> <Compile Include="devicestatushistory.cs" />
<Compile Include="Entity.cs" /> <Compile Include="Entity.cs" />

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="BouncyCastle" version="1.8.5" targetFramework="net461" /> <package id="BouncyCastle" version="1.8.5" targetFramework="net461" />
<package id="CSRedisCore" version="3.8.807" targetFramework="net48" />
<package id="EntityFramework" version="6.4.4" targetFramework="net461" /> <package id="EntityFramework" version="6.4.4" targetFramework="net461" />
<package id="Fleck" version="1.2.0" targetFramework="net48" /> <package id="Fleck" version="1.2.0" targetFramework="net48" />
<package id="Google.Protobuf" version="3.19.4" targetFramework="net461" /> <package id="Google.Protobuf" version="3.19.4" targetFramework="net461" />
@@ -15,4 +16,5 @@
<package id="System.Memory" version="4.5.4" targetFramework="net461" /> <package id="System.Memory" version="4.5.4" targetFramework="net461" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" /> <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net461" /> <package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
</packages> </packages>