Skip to content

Conversation

@garyschulte
Copy link
Contributor

PR description

Simple PR, aids in plugin registration debugging and discovery via logging

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

if (config.isContinueOnPluginError()) {
LOG.error("Error matching or registering plugins. Plugins will not start.", e);
} else {
throw new RuntimeException("Error matching or registering plugins. Plugins will not start", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Error matching or registering plugins. Besu will not start

}

private List<BesuPlugin> detectPlugins(final PluginConfiguration config) {
LOG.debug("detecting plugin in configured besu.plugins.dir {}", config.getPluginsDir());
Copy link
Contributor

Choose a reason for hiding this comment

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

I wasn't able to get this to log with "DEBUG"

final URL[] pluginJarURLs =
pluginFilesList
.filter(p -> p.getFileName().toString().endsWith(".jar"))
.peek(p -> LOG.debug("plugin jar url: {}", p))
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, DEBUG did not work but maybe it is my configuration

// if block import tracer provider is not specified by plugin, default to no tracing
.orElse((__) -> BlockAwareOperationTracer.NO_TRACING);
.orElse((__) -> {
LOG.info("Block Import uses NO_TRACING");
Copy link
Contributor

Choose a reason for hiding this comment

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

This will be logged every time that a block is processed. Maybe move the log outside of the lambda body or change it to trace

@github-actions
Copy link

This pr is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the Stale label May 14, 2025
@github-actions
Copy link

This pr was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants