You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
683 B

// See https://aka.ms/new-console-template for more information
using ConsoleStarter;
using log4net;
using log4net.Config;
using Newtonsoft.Json;
internal class Program
{
private static readonly ILog Log = LogManager.GetLogger(typeof(Program));
public static void Main(string[] args)
{
XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + @"\log4net.xml"));
string str = "{\n\"header\":{\n\"cmd\":\"amtBat\",\n\"id\":1,\n\"sid\":\"xxxx\"\n},\n\"body\":{\n\"sn\": \"xxxx\",\n\"cn\": \"xxxx\",\n\"bn\": \"xxxx\",\n\"bm\": \"xxxx\",\n\"at\": \"2020-11-20 18:23:06\",\n\"am\": 30\n}\n}";
Log.Info(str);
}
}