Skip to content

Conversation

@Jonathing
Copy link
Member

This PR migrates Log Utils from the static Log class to the traditional Logger instance loggers. Here's my plan for this:

  • Deleting Log, since everything is going to be instance-based now. There's no real way I can preserve it without basically duplicating the entire project.
  • Interface Logger will define the contract for consumers using loggers.
  • Abstract class AbstractLogger defines the simplest implementation of a basic logger, only having method log(Logger.Level, String) to override and the base implementation handles the rest.
    • Abstract logger can be created with an initial enabled log level (defaults to INFO) or indentation level.

This one was based on a suggestion from @LexManos. My original intention behind the single static Log was for simplicity and performance, but since every god damn logging framework is instance-based (including Java's), there's no real point if we need to have instance loggers anyway.

The only thing I haven't done yet are log tags, like prefixing messages with [Mavenizer] or something. I don't think it would play nice with the indentation system, so we'd likely have to choose between either that or the indentations.

@Jonathing Jonathing requested a review from LexManos October 25, 2025 03:16
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.

1 participant