Repository navigation
Resolve akka.loggers names before starting any logger - #8778
Merged
Aaronontheweb merged 3 commits intoOct 6, 2026
Merged
Aaronontheweb merged 3 commits into
Aaronontheweb merged 3 commits into
Conversation
A name that could not be resolved made ActorSystem.Create throw after earlier loggers had already been started, so their actors were constructed in the background of a system that never came up. All names are now resolved first. Also report a failed shutdown of a half-started system instead of dropping the Terminate task.
It cannot fault with default settings, so there is nothing worth reporting.
Point akka.loggers-dispatcher at a missing dispatcher so starting any logger throws synchronously. The exception that comes out shows whether names were resolved before the first logger start.
Aaronontheweb
commented
Oct 6, 2026
| await AkkaFeaturesSpec.WithDynamicTypeLoading(false, () => | ||
| { | ||
| Action create = () => ActorSystem.Create("UnresolvableLoggerSetupOff", setup); | ||
| var thrown = create.Should().Throw<ConfigurationException>().WithMessage("*not built in*"); |
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the logger-startup case in #8772.
LoggingBus.StartDefaultLoggersstarted theLoggerSetuploggers and then resolvedakka.loggersone entry at a time. A name that could not be resolved threwConfigurationExceptionafter earlier loggers had already been started, so their actors were constructed in the background afterActorSystem.Createhad thrown. Everyakka.loggersname is now resolved before the first logger starts. Exception types, messages and start order are unchanged.The two new specs also point
akka.loggers-dispatcherat a dispatcher that does not exist, which makes starting any logger throw synchronously. The exception that comes out shows which happened first. Against the old code both specs fail with "Dispatcher [no-such-loggers-dispatcher] not configured"; with this change they get the unresolvable-name error.This does not change the general behavior described in #8772 for other startup failures.