From 201c67d46e1d6913a5163f6ef7ff26cfb7fad18d Mon Sep 17 00:00:00 2001 From: Alek-ban Date: Wed, 4 Feb 2026 07:31:56 +0300 Subject: [PATCH] refactor: move Logging to GSS2.Core --- {GSS2.Test => GSS2.Core}/Logging/ConsoleFormatter.cs | 3 ++- {GSS2.Test => GSS2.Core}/Logging/FileLogger.cs | 4 +++- {GSS2.Test => GSS2.Core}/Logging/FileLoggerProvider.cs | 4 +++- {GSS2.Test => GSS2.Core}/Logging/LibCameraLogSink.cs | 3 ++- GSS2.Test/GSS2.Test.csproj | 1 - GSS2.Test/Program.cs | 5 +++-- 6 files changed, 13 insertions(+), 7 deletions(-) rename {GSS2.Test => GSS2.Core}/Logging/ConsoleFormatter.cs (98%) rename {GSS2.Test => GSS2.Core}/Logging/FileLogger.cs (96%) rename {GSS2.Test => GSS2.Core}/Logging/FileLoggerProvider.cs (86%) rename {GSS2.Test => GSS2.Core}/Logging/LibCameraLogSink.cs (98%) diff --git a/GSS2.Test/Logging/ConsoleFormatter.cs b/GSS2.Core/Logging/ConsoleFormatter.cs similarity index 98% rename from GSS2.Test/Logging/ConsoleFormatter.cs rename to GSS2.Core/Logging/ConsoleFormatter.cs index 39a8880..31d4e67 100644 --- a/GSS2.Test/Logging/ConsoleFormatter.cs +++ b/GSS2.Core/Logging/ConsoleFormatter.cs @@ -1,6 +1,7 @@ +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; -namespace GSS2.Test.Logging; +namespace GSS2.Core.Logging; public sealed class ConsoleFormatter : Microsoft.Extensions.Logging.Console.ConsoleFormatter { diff --git a/GSS2.Test/Logging/FileLogger.cs b/GSS2.Core/Logging/FileLogger.cs similarity index 96% rename from GSS2.Test/Logging/FileLogger.cs rename to GSS2.Core/Logging/FileLogger.cs index 09ca46f..6a286b7 100644 --- a/GSS2.Test/Logging/FileLogger.cs +++ b/GSS2.Core/Logging/FileLogger.cs @@ -1,4 +1,6 @@ -namespace GSS2.Test.Logging; +using Microsoft.Extensions.Logging; + +namespace GSS2.Core.Logging; public sealed class FileLogger : ILogger { diff --git a/GSS2.Test/Logging/FileLoggerProvider.cs b/GSS2.Core/Logging/FileLoggerProvider.cs similarity index 86% rename from GSS2.Test/Logging/FileLoggerProvider.cs rename to GSS2.Core/Logging/FileLoggerProvider.cs index b047314..4063dca 100644 --- a/GSS2.Test/Logging/FileLoggerProvider.cs +++ b/GSS2.Core/Logging/FileLoggerProvider.cs @@ -1,4 +1,6 @@ -namespace GSS2.Test.Logging; +using Microsoft.Extensions.Logging; + +namespace GSS2.Core.Logging; public sealed class FileLoggerProvider : ILoggerProvider { diff --git a/GSS2.Test/Logging/LibCameraLogSink.cs b/GSS2.Core/Logging/LibCameraLogSink.cs similarity index 98% rename from GSS2.Test/Logging/LibCameraLogSink.cs rename to GSS2.Core/Logging/LibCameraLogSink.cs index e3c7c0e..8734ee4 100644 --- a/GSS2.Test/Logging/LibCameraLogSink.cs +++ b/GSS2.Core/Logging/LibCameraLogSink.cs @@ -1,6 +1,7 @@ +using Microsoft.Extensions.Logging; using LibCameraSharp; -namespace GSS2.Test.Logging; +namespace GSS2.Core.Logging; public sealed class LibCameraLogSink : IDisposable { diff --git a/GSS2.Test/GSS2.Test.csproj b/GSS2.Test/GSS2.Test.csproj index cbb7c61..64b64e5 100644 --- a/GSS2.Test/GSS2.Test.csproj +++ b/GSS2.Test/GSS2.Test.csproj @@ -35,6 +35,5 @@ - diff --git a/GSS2.Test/Program.cs b/GSS2.Test/Program.cs index 4ca8a2e..485a3c1 100644 --- a/GSS2.Test/Program.cs +++ b/GSS2.Test/Program.cs @@ -4,10 +4,11 @@ using Microsoft.Extensions.Logging.Console; using Avalonia; using Avalonia.OpenGL.Egl; using GSS2.Core; +using GSS2.Core.Logging; using GSS2.Core.Analysis.AmineContent.Database; -using GSS2.Test.Logging; +using ConsoleFormatter = GSS2.Core.Logging.ConsoleFormatter; + namespace GSS2.Test; -using ConsoleFormatter = GSS2.Test.Logging.ConsoleFormatter; public class Program {