-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Flush error_logger before capturing #5280
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
Conversation
processes. It is possible to ensure explicit log messages from other | ||
processes are captured by waiting for their exit or monitor | ||
signal. This does not guarantee to capture VM generated log messages | ||
when a process spawned using a `spawn` BIF does not catch an exception. |
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.
I've definitely heard the term BIF used in erlang docs, but don't think I've encountered it in the Elixir docs so I've assumed it wasn't really a term used by Elixir. Should this be Kernel.spawn
or similar instead?
👍 Thanks, @fishcakez! |
when a process is spawned using a low level `Kernel` spawn function (e.g. | ||
`Kernel.spawn/1`) does not catch an exception. A `Task`, or other OTP | ||
process, will send explicit logs that are sent before its exit or monitor | ||
signal and will not cause VM generated log messages. |
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.
@myronmarston is this description clearer?
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.
It's better, but I think the "does not catch an exception" part is a bit confusing. This spawned process does not catch an exception, but I don't think it's what you mean:
spawn(fn -> :ok end)
Maybe "raises an unhandled exception" or just "crashes" or something similar would be clearer?
when a process is spawned using a low level `Kernel` spawn function (e.g. | ||
`Kernel.spawn/1`) raises an exception that isn't rescued or a thow that | ||
isn't caught. A `Task`, orther OTP process, will send explicit logs that | ||
are sent before its exit or monitor signal and will not cause VM generated |
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.
@myronmarston how about this rewording?
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.
Much clearer. I found a couple more grammar/spelling issues. I'm happy with it once those are addressed :).
processes are captured by waiting for their exit or monitor | ||
signal. This does not guarantee to capture VM generated log messages | ||
when a process is spawned using a low level `Kernel` spawn function (e.g. | ||
`Kernel.spawn/1`) raises an exception that isn't rescued or a thow that |
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.
s/thow/throw/
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.
Fixed
Please don't squash/merge before #5262 and please do backport to |
processes. It is possible to ensure explicit log messages from other | ||
processes are captured by waiting for their exit or monitor | ||
signal. This does not guarantee to capture VM generated log messages | ||
when a process is spawned using a low level `Kernel` spawn function (e.g. |
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.
Grammatically, "process is spawned...raises" is awkward. "process that is spawned...raises" reads better.
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.
fixed
signal. This does not guarantee to capture VM generated log messages | ||
when a process is spawned using a low level `Kernel` spawn function (e.g. | ||
`Kernel.spawn/1`) raises an exception that isn't rescued or a throw that | ||
isn't caught. A `Task`, orther OTP process, will send explicit logs that |
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.
s/orther/or other/
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.
fixed
English is my native language ❤️ |
❤️ 💚 💙 💛 💜 |
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
/cc @myronmarston