• 大小: 2.07M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: Socket通信  Socket  Modbus  ck  OC  

资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ServerForClientRms
{
    public  class LogClass
    {
        log4net.ILog logInfo = log4net.LogManager.GetLogger(“loginfo“);
            //logInfo.Info(“测试日志写入“);
       // private static log4net.ILog log = log4net.LogManager.GetLogger(“LogClass“);
        /// 
        /// 写入日志文件
        /// 

        public void init()
        {

            var l = (log4net.Repository.Hierarchy.Logger)logInfo.Logger;
           // l.Level = l.Hierarchy.LevelMap[“ERROR“];
            string txtLogPath = string.Empty;

            DateTime d = DateTime.Now;
            string strFileName = d.Year.ToString() + (d.Month.ToString().Length == 1 ? (“0“ + d.

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-12-19 09:11  ServerForClientRms\
     目录           0  2019-12-30 14:26  ServerForClientRms\ServerForClientRms\
     目录           0  2019-12-10 08:42  ServerForClientRms\ServerForClientRms\.vs\
     目录           0  2019-12-10 08:42  ServerForClientRms\ServerForClientRms\.vs\ServerForClientRms\
     目录           0  2019-12-10 08:42  ServerForClientRms\ServerForClientRms\.vs\ServerForClientRms\v14\
     文件        3584  2019-12-10 08:42  ServerForClientRms\ServerForClientRms\.vs\ServerForClientRms\v14\.suo
     目录           0  2019-12-19 10:25  ServerForClientRms\ServerForClientRms\Common\
     文件         827  2019-12-10 08:39  ServerForClientRms\ServerForClientRms\Common\EnumMachineError.cs
     文件        6537  2019-12-30 13:38  ServerForClientRms\ServerForClientRms\Common\ModbusCommon.cs
     文件        6118  2019-12-30 14:26  ServerForClientRms\ServerForClientRms\Common\TextFile1.txt
     文件        8494  2019-12-23 13:51  ServerForClientRms\ServerForClientRms\Common\ValidateStatus.cs
     目录           0  2019-12-10 08:36  ServerForClientRms\ServerForClientRms\Dao\
     文件       10441  2019-12-30 10:51  ServerForClientRms\ServerForClientRms\Dao\InsertDao.cs
     文件        4933  2019-12-10 08:39  ServerForClientRms\ServerForClientRms\Dao\InsertRecipe.cs
     文件        1871  2019-12-10 08:39  ServerForClientRms\ServerForClientRms\Dao\UserDao.cs
     文件        2479  2019-12-10 08:39  ServerForClientRms\ServerForClientRms\LogClass.cs
     目录           0  2019-12-10 08:36  ServerForClientRms\ServerForClientRms\Model\
     文件       15550  2019-12-10 08:39  ServerForClientRms\ServerForClientRms\Model\BenMachine.cs
     文件        6566  2019-12-10 08:39  ServerForClientRms\ServerForClientRms\Model\MachineState.cs
     文件        4343  2019-12-10 08:39  ServerForClientRms\ServerForClientRms\MyBytes.cs
     文件         953  2019-12-10 08:39  ServerForClientRms\ServerForClientRms\Program.cs
     目录           0  2019-12-10 08:36  ServerForClientRms\ServerForClientRms\Properties\
     文件        1455  2019-12-10 09:06  ServerForClientRms\ServerForClientRms\Properties\AssemblyInfo.cs
     文件        4202  2019-12-24 15:21  ServerForClientRms\ServerForClientRms\ServerForClientRms.csproj
     文件         227  2019-07-02 18:19  ServerForClientRms\ServerForClientRms\ServerForClientRms.csproj.user
     文件       33288  2019-12-30 14:25  ServerForClientRms\ServerForClientRms\SocketController.cs
     文件       30339  2019-12-11 09:13  ServerForClientRms\ServerForClientRms\StringUtils.cs
     文件         494  2019-12-24 15:13  ServerForClientRms\ServerForClientRms\app.config
     目录           0  2019-12-10 08:36  ServerForClientRms\ServerForClientRms\bin\
     目录           0  2019-12-24 15:21  ServerForClientRms\ServerForClientRms\bin\Debug\
     目录           0  2019-12-23 09:34  ServerForClientRms\ServerForClientRms\bin\Debug\Log\
............此处省略68个文件信息

评论

共有 条评论