-
-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System props #1601
System props #1601
Conversation
Roger Johansson seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
@@ -70,6 +70,25 @@ public PID SpawnNamed(Props props, string name) | |||
throw; | |||
} | |||
} | |||
|
|||
public PID SpawnNamedSystem(Props props, string name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be moved somewhere else to not clutter RootContext.
Maybe an extension method
/// </summary> | ||
public Func<string, Props, Props> ConfigureSystemProps { get; init; } = (_,props) => props | ||
.WithDeadlineDecorator(TimeSpan.FromSeconds(1)) | ||
.WithLoggingContextDecorator() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we should use a logging decorator by default, should we reduce the log level for messages to trace?
This could quickly become very noisy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I've set the loglevel to None. but using Information for system/infra messages, and Error for anything that throws
} | ||
catch (Exception x) | ||
{ | ||
Logger.LogError(x, "RootContext Failed to spawn child actor {Name}", name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throw wrapped in inner exception instead?
It's also spawned in root context, not a child actor
PoC, allow configuring system actor props