-
Notifications
You must be signed in to change notification settings - Fork 10
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
Sticky messages with subprocesses do not work well #22
Comments
Yes, this is ultimately what's required: the One thing which certainly seems realistic is to make this work automatically when using |
True, an environment variable could be used to define some "julia log server" context and that could be used to initialize the default global logger to something other than Hopefully getting the IPC right is not too much of a nightmare. For functionality on localhost (without authentication or encryption) I guess we could just use So maybe getting it working with |
Yeah, I think that'd be super cool. I cannot decide if it is too much of a magic to happen automatically, though. I agree adding a support for processes created via
The workaround I was thinking was something stupid-simple: just use the " |
Haha, I suspect it probably is :-) If log record serialization is done via |
Ah, yes, serialization is super tricky when two processes can activate different projects. Hmm... I wonder if it's better to lower everything into (say) JSON-encodable primitive types (or msgpack/BSON/etc.) at each process. Probably there are already several language-agnostic logging frameworks that do this. |
I don't think there's a one-size-fits-all approach. I suspect that for For more heterogeneous distributed systems I think the JSON-or-similar approach will be needed. There's a whole lot of log servers for the receive side which already do this kind of thing, so we could choose one of the better ones and take some conventions from that. |
When writing JuliaCI/PkgBenchmark.jl#104, I realized that sticky messages do not work well with sub-processes. An example:
But I'm not sure if it's probably impossible to fix this in TerminalLoggers.jl. Maybe implementing some workarounds using an environment variable could be helpful.
Ultimate solution may be to merge log records from subprocesses to the main process using IPC-based logger "bridge" (which is way outside of the scope of TerminalLoggers.jl, I guess, though).
The text was updated successfully, but these errors were encountered: