From d71866268c311a57fd837e18927a93affe24186d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 20 Mar 2022 00:11:12 +0000 Subject: [PATCH 1/7] Automated dotnet-format update --- src/Bannerlord.ButterLib/ButterLibSubModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bannerlord.ButterLib/ButterLibSubModule.cs b/src/Bannerlord.ButterLib/ButterLibSubModule.cs index 5291c37d..56e8a2ee 100644 --- a/src/Bannerlord.ButterLib/ButterLibSubModule.cs +++ b/src/Bannerlord.ButterLib/ButterLibSubModule.cs @@ -179,7 +179,7 @@ private static void CheckGameVersion() if (ApplicationVersionHelper.GameVersion() is { } gameVersion && gameVersion < e172) { var sb = new StringBuilder(); - sb.AppendLine(new TextObject(SMessageWrongGameVersion, new() { {"GAMEVERSION", ApplicationVersionHelper.ToString(gameVersion)} }).ToString()); + sb.AppendLine(new TextObject(SMessageWrongGameVersion, new() { { "GAMEVERSION", ApplicationVersionHelper.ToString(gameVersion) } }).ToString()); sb.AppendLine(); sb.AppendLine(new TextObject(SMessageContinue).ToString()); switch (MessageBox.Show(sb.ToString(), new TextObject(SWarningTitle).ToString(), MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, (MessageBoxOptions) 0x40000)) From 8c27094d2ce498453cb794338b24e8c367779d41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 04:28:17 +0000 Subject: [PATCH 2/7] Bump Harmony.Extensions from 2.0.0.54 to 2.0.0.55 Bumps [Harmony.Extensions](https://github.com/BUTR/Harmony.Extensions) from 2.0.0.54 to 2.0.0.55. - [Release notes](https://github.com/BUTR/Harmony.Extensions/releases) - [Commits](https://github.com/BUTR/Harmony.Extensions/commits) --- updated-dependencies: - dependency-name: Harmony.Extensions dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build/common.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/common.props b/build/common.props index bc3dfd3d..0bfe1acc 100644 --- a/build/common.props +++ b/build/common.props @@ -14,7 +14,7 @@ 1.0.1.68 2.0.0.78 3.0.94 - 2.0.0.54 + 2.0.0.55 From a1fb86c6c619b3c81c2c854cad35d084d8d34d12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 04:28:24 +0000 Subject: [PATCH 3/7] Bump nunit from 3.13.2 to 3.13.3 Bumps [nunit](https://github.com/nunit/nunit) from 3.13.2 to 3.13.3. - [Release notes](https://github.com/nunit/nunit/releases) - [Changelog](https://github.com/nunit/nunit/blob/v3.13.3/CHANGES.md) - [Commits](https://github.com/nunit/nunit/compare/v3.13.2...v3.13.3) --- updated-dependencies: - dependency-name: nunit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Bannerlord.ButterLib.Implementation.Tests.csproj | 2 +- .../Bannerlord.ButterLib.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Bannerlord.ButterLib.Implementation.Tests/Bannerlord.ButterLib.Implementation.Tests.csproj b/tests/Bannerlord.ButterLib.Implementation.Tests/Bannerlord.ButterLib.Implementation.Tests.csproj index c6c85f6d..015395ab 100644 --- a/tests/Bannerlord.ButterLib.Implementation.Tests/Bannerlord.ButterLib.Implementation.Tests.csproj +++ b/tests/Bannerlord.ButterLib.Implementation.Tests/Bannerlord.ButterLib.Implementation.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/tests/Bannerlord.ButterLib.Tests/Bannerlord.ButterLib.Tests.csproj b/tests/Bannerlord.ButterLib.Tests/Bannerlord.ButterLib.Tests.csproj index 8d0aecde..d3305a4a 100644 --- a/tests/Bannerlord.ButterLib.Tests/Bannerlord.ButterLib.Tests.csproj +++ b/tests/Bannerlord.ButterLib.Tests/Bannerlord.ButterLib.Tests.csproj @@ -15,7 +15,7 @@ - + From e50475cdf305730853927e1db9120d5da60e12d8 Mon Sep 17 00:00:00 2001 From: Vitaly Mikhailov Date: Mon, 21 Mar 2022 12:19:03 +0300 Subject: [PATCH 4/7] Update dependabot.yml --- .github/dependabot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 047864cd..d22d2c29 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,6 +9,7 @@ updates: - dependency-name: "Bannerlord.ReferenceAssemblies.*" - dependency-name: "Lib.Harmony" - dependency-name: "Microsoft.Extensions.*" + - dependency-name: "System.Reflection.Metadata" - package-ecosystem: "github-actions" directory: "/" From 1ad4b7a4ad0e980209945d7673081ebb1de5392b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 04:19:02 +0000 Subject: [PATCH 5/7] Bump danielpalme/ReportGenerator-GitHub-Action from 5.1.2 to 5.1.3 Bumps [danielpalme/ReportGenerator-GitHub-Action](https://github.com/danielpalme/ReportGenerator-GitHub-Action) from 5.1.2 to 5.1.3. - [Release notes](https://github.com/danielpalme/ReportGenerator-GitHub-Action/releases) - [Commits](https://github.com/danielpalme/ReportGenerator-GitHub-Action/compare/5.1.2...5.1.3) --- updated-dependencies: - dependency-name: danielpalme/ReportGenerator-GitHub-Action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/test-full.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-full.yml b/.github/workflows/test-full.yml index 7fb75e2d..962b37f0 100644 --- a/.github/workflows/test-full.yml +++ b/.github/workflows/test-full.yml @@ -71,7 +71,7 @@ jobs: shell: pwsh - name: ReportGenerator - uses: danielpalme/ReportGenerator-GitHub-Action@5.1.2 + uses: danielpalme/ReportGenerator-GitHub-Action@5.1.3 with: reports: '*.xml' targetdir: 'coveragereport' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5bf9a2c1..ffbd40ed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,7 +76,7 @@ jobs: shell: pwsh - name: ReportGenerator - uses: danielpalme/ReportGenerator-GitHub-Action@5.1.2 + uses: danielpalme/ReportGenerator-GitHub-Action@5.1.3 with: reports: 'coverage_butterlib_stable_debug.xml;coverage_butterlib_stable_release.xml;coverage_butterlib_impl_stable_debug.xml;coverage_butterlib_impl_stable_release.xml;coverage_butterlib_impl_beta_debug.xml;coverage_butterlib_impl_beta_release.xml;' targetdir: 'coveragereport' From 15a4926371473e46509d78d4501ac78953e9dab8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 04:21:36 +0000 Subject: [PATCH 6/7] Bump Bannerlord.BUTR.Shared from 2.0.0.78 to 2.0.0.82 Bumps [Bannerlord.BUTR.Shared](https://github.com/BUTR/Bannerlord.BUTR.Shared) from 2.0.0.78 to 2.0.0.82. - [Release notes](https://github.com/BUTR/Bannerlord.BUTR.Shared/releases) - [Commits](https://github.com/BUTR/Bannerlord.BUTR.Shared/commits) --- updated-dependencies: - dependency-name: Bannerlord.BUTR.Shared dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build/common.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/common.props b/build/common.props index 0bfe1acc..dc915154 100644 --- a/build/common.props +++ b/build/common.props @@ -12,7 +12,7 @@ 2.0.0 1.0.1.68 - 2.0.0.78 + 2.0.0.82 3.0.94 2.0.0.55 From 3c3e7816fdba0aba742bdcf9ab60cb9504053329 Mon Sep 17 00:00:00 2001 From: Aragas Date: Sun, 3 Apr 2022 16:58:00 +0300 Subject: [PATCH 7/7] Fixed trace listener --- build/common.props | 2 +- changelog.txt | 4 ++++ src/Bannerlord.ButterLib/Logger/LoggerTraceListener.cs | 10 ++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build/common.props b/build/common.props index 0bfe1acc..d2a09c3a 100644 --- a/build/common.props +++ b/build/common.props @@ -4,7 +4,7 @@ - 2.1.1 + 2.1.2 2.2.1 diff --git a/changelog.txt b/changelog.txt index f93dd56c..74e677f4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,8 @@ --------------------------------------------------------------------------------------------------- +Version: 2.1.2 +Game Versions: e1.7.2 +* Fixed trace listener +--------------------------------------------------------------------------------------------------- Version: 2.1.1 Game Versions: e1.7.2 * Fixed unintended crashes when running on pre e1.7.2 diff --git a/src/Bannerlord.ButterLib/Logger/LoggerTraceListener.cs b/src/Bannerlord.ButterLib/Logger/LoggerTraceListener.cs index b18a4f9a..30ef9ac3 100644 --- a/src/Bannerlord.ButterLib/Logger/LoggerTraceListener.cs +++ b/src/Bannerlord.ButterLib/Logger/LoggerTraceListener.cs @@ -15,12 +15,13 @@ private record ParseResult private static ParseResult? Parse(ReadOnlySpan str) { - var logLevelIdx = str.IndexOf(':'); + if (str.IndexOf(':') is var logLevelIdx && logLevelIdx == -1) + return null; var sourceLogLevel = str.Slice(0, logLevelIdx); var eventIdMessage = str.Slice(logLevelIdx + 1); - if (sourceLogLevel.LastIndexOf(' ') is { } sourceIdx && sourceIdx == -1) + if (sourceLogLevel.LastIndexOf(' ') is var sourceIdx && sourceIdx == -1) return null; var process = sourceLogLevel.Slice(0, sourceIdx); var logLevelStr = sourceLogLevel.Slice(sourceIdx + 1); @@ -35,10 +36,7 @@ private record ParseResult return new ParseResult { - Process = process.ToString(), - Level = logLevel, - EventId = eventId, - Message = message.ToString() + Process = process.ToString(), Level = logLevel, EventId = eventId, Message = message.ToString() }; }