移除日志中的时间,使用log4net的时间

This commit is contained in:
qmj
2025-07-24 13:12:59 +08:00
parent 98905adc86
commit ad04f2d658
22 changed files with 1373 additions and 170 deletions
+64
View File
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SkinSE;
// ReSharper disable IdentifierTypo
namespace UFIDA.U8.Framework.Api.App
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
var skin = new SkinSE_Net();
skin.Init_NET(panel1, 1);
skin.Init_NET(panel1, 1);
skin.Init_NET(this, 0);
}
private void TsmiConfig_Click(object sender, EventArgs e)
{
var frm = new ApiConfig();
frm.ShowDialog();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
var path = ConfigurationManager.AppSettings["ServerPath"];
var logPath = Path.Combine(path, "Log", $"Log_{dateTimePicker1.Value:yyyyMMdd}.log");
var reader = new StreamReader(logPath,Encoding.Default);
var tk = reader.ReadToEndAsync();
richTextBox1.Text = tk.Result;
reader.Close();
}
catch (Exception ex)
{
richTextBox1.Text = ex.Message;
MessageBox.Show($@"未查询到{dateTimePicker1.Value:yyyy-MM-dd}的日志文件");
}
}
}
}