You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The StandardOutLogger gets started at the very end to capture any output from shutting down the other parts of the logging system as it shuts down, so it happens at the very, very end. There shouldn't be anything else important happening by this point as the rest of the application has already been terminated by the time the ActorSystem shutdown process reaches this point.
@Aaronontheweb In my case it's very unfortunate - I have created simple console app which gets invoked with commands then do it's job and quits - like Git, for example git status shows current status then quits app.
I designed it with Akka.Net - I know downsides of this decision, I know that every time I invoke app, whole actor system must be created and in my case it's acceptable performance, so this is not the subject to this comment (in the future I can move logic to separate long living process, like Docker does, invoking docker ps doesn't start up whole Docker, it just connects to deamon).
Of course I want logs, so I have configured NLog to save logs to file. But I never want them in console output, as this is my user interface, so I have explicitly configured stdout-loglevel = off
But with akka's design quoted in the beginning of this comment, every time job is done I see in my console output:
[DEBUG][2021-09-02 07:50:46][Thread 0009][EventStream] Shutting down: StandardOutLogger started
[DEBUG][2021-09-02 07:50:46][Thread 0009][EventStream] unsubscribing [akka://Q/system/log1-NLogLogger#918463714] from all channels
So to understand why I don't want this, imagine I that I now want to create new Git version rewritten with Akka.Net and every time user wants to see repo status sees something like this:
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
[DEBUG][2021-09-02 07:50:46][Thread 0009][EventStream] Shutting down: StandardOutLogger started
[DEBUG][2021-09-02 07:50:46][Thread 0009][EventStream] unsubscribing [akka://Q/system/log1-NLogLogger#918463714] from all channels
In my view (and this is what I asks for) this behavior should be changed and starts to respect stdout-loglevel log level (which can be set to off) or maybe some new configuration should be added, something like start-up-stdout-during-shutdown.
another related feature, for better logging during shutdown, when the normal logger gets replaced by StandardOutLogger, would be to make the "minimal" logger configurable. To support custom logger, inherited from MinimalActorRef, instead of only StandardOutLogger hardcoded
@Aaronontheweb In my case it's very unfortunate - I have created simple console app which gets invoked with commands then do it's job and quits - like Git, for example git status shows current status then quits app.
I designed it with Akka.Net - I know downsides of this decision, I know that every time I invoke app, whole actor system must be created and in my case it's acceptable performance, so this is not the subject to this comment (in the future I can move logic to separate long living process, like Docker does, invoking docker ps doesn't start up whole Docker, it just connects to deamon).
Of course I want logs, so I have configured NLog to save logs to file. But I never want them in console output, as this is my user interface, so I have explicitly configured
stdout-loglevel = off
But with akka's design quoted in the beginning of this comment, every time job is done I see in my console output:
So to understand why I don't want this, imagine I that I now want to create new Git version rewritten with Akka.Net and every time user wants to see repo status sees something like this:
In my view (and this is what I asks for) this behavior should be changed and starts to respect
stdout-loglevel
log level (which can be set to off) or maybe some new configuration should be added, something likestart-up-stdout-during-shutdown
.Originally posted by @tometchy in #4045 (comment)
The text was updated successfully, but these errors were encountered: