Skip to content

[POC] Log to the FormatterLogger of the resolve context - #585

Open
laeubi wants to merge 2 commits into
apache:masterfrom
laeubi:resolver-context-logger
Open

laeubi wants to merge 2 commits into
apache:masterfrom
laeubi:resolver-context-logger

Conversation

@laeubi

@laeubi laeubi commented Oct 29, 2026

Copy link
Copy Markdown

Showcase for the proposed ResolveContext.getLogger() in osgi/org.osgi.service.resolver#44.

Stacked on #584: the first commit belongs to that PR and disappears once it is merged.

  • Update the embedded resolver API with ResolveContext.getLogger() (package version 1.2.0)
  • Add ContextLogger, which redirects the resolver log messages to the FormatterLogger of the resolve context
  • Log the number of resources at the start of a resolution, using the formatter with parameters
  • Without a context logger the default logger is used as before

A resolver created through the ServiceLoader (#584) has no other way to get a logger, which is the motivation for the proposal.

Christoph Läubrich and others added 2 commits October 29, 2026 08:52
Add a public no-arg ResolverImpl constructor and register it in
META-INF/services/org.osgi.service.resolver.Resolver, so tools can
obtain the resolver without OSGi or a hard reference to the class.

Showcase for the proposed OSGi spec change in
osgi/org.osgi.service.resolver. No JIRA issue yet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
If the resolve context provides a FormatterLogger, the resolver
redirects its log messages there. Without one, the default logger
is used as before.

Showcase for osgi/org.osgi.service.resolver#44. Stacked on apache#584.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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