From 68c1010ff1151360b589664865d6660fa009a5c6 Mon Sep 17 00:00:00 2001 From: Denis Denisov Date: Thu, 10 Jul 2025 22:58:04 +0300 Subject: [PATCH] Less logging --- Logging.cs | 2 +- ModbusServer.cs | 2 +- Properties/PublishProfiles/FolderProfile.pubxml.user | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Logging.cs b/Logging.cs index 810c1b0..fc23ac3 100644 --- a/Logging.cs +++ b/Logging.cs @@ -9,7 +9,7 @@ namespace Barsik var config = new NLog.Config.LoggingConfiguration(); var logConsole = new NLog.Targets.ConsoleTarget("logconsole"); - config.AddRuleForAllLevels(logConsole); + config.AddRuleForOneLevel(LogLevel.Info, logConsole); LogManager.Configuration = config; } } diff --git a/ModbusServer.cs b/ModbusServer.cs index 0d49f18..07d8cae 100644 --- a/ModbusServer.cs +++ b/ModbusServer.cs @@ -28,7 +28,7 @@ namespace Barsik while (true) { var client = listener.AcceptTcpClient(); - logger.Info("Accepted connection from " + client.Client.RemoteEndPoint); + logger.Debug("Accepted connection from " + client.Client.RemoteEndPoint); var worker = new ModbusServerWorker(registers, client); Thread clientThread = new Thread(new ThreadStart(worker.Run)); clientThread.Start(); diff --git a/Properties/PublishProfiles/FolderProfile.pubxml.user b/Properties/PublishProfiles/FolderProfile.pubxml.user index 312c6e3..79f6e36 100644 --- a/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -3,4 +3,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> + + True|2025-07-10T19:55:50.7510832Z||;True|2025-07-10T22:55:09.2420025+03:00||; + + \ No newline at end of file