Skip to content
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

Akka.Streams: make LogLevel customizable on the .Log method #7127

Open
Aaronontheweb opened this issue Mar 19, 2024 · 0 comments
Open

Akka.Streams: make LogLevel customizable on the .Log method #7127

Aaronontheweb opened this issue Mar 19, 2024 · 0 comments

Comments

@Aaronontheweb
Copy link
Member

Is your feature request related to a problem? Please describe.

The .Log method in Akka.Streams doesn't currently support a LogLevel and isn't really friendly for users to actually use.

var task = source.DivertTo(evenSink, i => i % 2 == 0)
  .Log("foo", i => $"log me {i}")
  .DivertTo(threeSink, i => i % 3 == 0)
  .DivertTo(fiveSink, i => i % 5 == 0)
  .RunWith(Sink.ForEach<int>(i => Console.WriteLine($"{i} is unhandled")), actorSystem);

Describe the solution you'd like

I think it'd be better if:

  • We allowed users to just pass in a LogLevel on the given call;
  • Alternatively, if we exposed the ILoggingAdapter directly as a method and just let the user call it normally, rather than doing this cute Func<T, object> junk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant