Skip to content

Increase log verbosity of refused event dispatch messages#274

Open
FiniteReality wants to merge 1 commit into
mainfrom
feature/cleaner-dispatch-refusal
Open

Increase log verbosity of refused event dispatch messages#274
FiniteReality wants to merge 1 commit into
mainfrom
feature/cleaner-dispatch-refusal

Conversation

@FiniteReality

Copy link
Copy Markdown
Member

Usually, when a modder has an error in their code, we will spam out a bunch of these errors because the mod state is broken.

However, if it were a true error, you would expect all of our dispatches to be guarded with something to the effect of if (!bus.isInErrorState()) { bus.dispatchEvent(...); } which is not the case.

Because of this, it's noise at best and should be warn at highest. Instead, I chose trace because it's TYPICALLY only of use to Neo devs, or more involved debugging from modders.

Usually, when a modder has an error in their code, we will spam out a bunch of these errors because the mod state is broken.

However, if it were a true error, you would expect all of our dispatches to be guarded with something to the effect of `if (!bus.isInErrorState()) { bus.dispatchEvent(...); }` which is not the case.

Because of this, it's noise at best and should be warn at highest. Instead, I chose trace because it's TYPICALLY only of use to Neo devs, or more involved debugging from modders.
@neoforged-pr-publishing

neoforged-pr-publishing Bot commented Apr 14, 2025

Copy link
Copy Markdown
  • Publish PR to GitHub Packages

Last commit published: 27c07915ea548363f33619c6f53ecbe126807cb9.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #274' // https://github.com/neoforged/FancyModLoader/pull/274
        url 'https://prmaven.neoforged.net/FancyModLoader/pr274'
        content {
            includeModule('net.neoforged.fancymodloader', 'earlydisplay')
            includeModule('net.neoforged.fancymodloader', 'junit-fml')
            includeModule('net.neoforged.fancymodloader', 'loader')
            includeModule('net.neoforged.fancymodloader', 'tests')
        }
    }
}

@UpcraftLP UpcraftLP left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM 👍🏻

@shartte

shartte commented Apr 14, 2025

Copy link
Copy Markdown
Contributor

If possible I'd like to finish the early error screen before we do something like this 🤔
Although I am aware that saying "it'll be ready soon, I promise" isn't worth much. :-(

@Technici4n

Copy link
Copy Markdown
Member

Not sure what this really achieves, the game will not load by that stage.

Nobody is going to enable trace logging, NeoForge developer or not. It's also not helpful that the log message is missing the event class in one of the cases.

if it were a true error, you would expect all of our dispatches to be guarded with something to the effect of if (!bus.isInErrorState()) { bus.dispatchEvent(...); } which is not the case.

What do you mean here?

@UpcraftLP

Copy link
Copy Markdown

Not sure what this really achieves, the game will not load by that stage.

well yeah, that is the point. the game will not load, and all this logging for logging's sake is not very helpful in 99.99% of use cases, when the real error that caused mod loading to fail just gets obscured by it.

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.

4 participants