Skip to content

Update to version 1.1.1 with log level padding (#13)#14

Merged
Serpensin merged 1 commit into
testfrom
master
Jul 29, 2025
Merged

Update to version 1.1.1 with log level padding (#13)#14
Serpensin merged 1 commit into
testfrom
master

Conversation

@Serpensin

Copy link
Copy Markdown
Owner
  • Update to version 1.1.1 with log level padding
  • Added consistent padding for log level field in logs.
  • Introduced unit test Logger_LogLevel_Padding_Is_Consistent to verify padding.
  • Modified log formatting in Logging.cs to ensure 5-character width for log levels.
  • Updated AssemblyInfo.cs to version 1.1.1.
  • Apply suggestions from code review

  • Update CHANGELOG.md


* Update to version 1.1.1 with log level padding

- Added consistent padding for log level field in logs.
- Introduced unit test `Logger_LogLevel_Padding_Is_Consistent` to verify padding.
- Modified log formatting in `Logging.cs` to ensure 5-character width for log levels.
- Updated `AssemblyInfo.cs` to version 1.1.1.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 29, 2025 22:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the project to version 1.1.1 by adding consistent padding to log level fields in the logging output. The change ensures all log levels display with a uniform 5-character width for better formatting alignment.

  • Added padding to log level field formatting to maintain consistent width
  • Introduced comprehensive unit test to verify log level padding behavior
  • Updated version number to 1.1.1 across assembly info and changelog

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
SerpentModding/Properties/AssemblyInfo.cs Updated assembly version from 1.1.0 to 1.1.1
SerpentModding/Logging.cs Modified log formatting to pad log levels to 5 characters using PadRight()
SerpentModding.Tests/UnitTest.cs Added unit test to verify consistent 5-character padding for all log levels
CHANGELOG.md Added changelog entry documenting the log level padding feature

if (start > 0 && end > start && line.Length > end + 1 && line[end + 1] == ' ' && line[start - 1] == '[')
{
var maybeLevel = line.Substring(start, end - start);
if (new[] { "TRACE", "DEBUG", "INFO ", "WARN ", "ERROR", "FATAL" }.Contains(maybeLevel))

Copilot AI Jul 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The array contains inconsistent padding with "INFO " and "WARN " having trailing spaces while others don't. This should be consistent - either all should have trailing spaces for 5-character width or use the actual padded values from PadRight(5).

Copilot uses AI. Check for mistakes.
@sonarqubecloud

Copy link
Copy Markdown

@Serpensin Serpensin merged commit ad1210c into test Jul 29, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants