JuliaLogging / LoggingExtras.jl

Composable Loggers for the Julia Logging StdLib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loggers do not have the `stream` property which seems to be expected from other Julia packages.

Krastanov opened this issue · comments

I am making a small web app with Genie. That web app is shelling out to a C program for a certain task. I am trying to use the Suppressor package to silence that noisy C program. However, Genie uses TransformerLogger on many things, so now I have to have Suppressor work with TransformerLogger.

Which causes problems because TransformerLogger does not have a stream property which leads to an error here https://github.com/JuliaIO/Suppressor.jl/blob/master/src/Suppressor.jl#L28

I will cross post this on the Suppressor issue tracker as I am not quite certain what is the correct way to solve this.

Suppressor is doing something wrong here.
One can't just assume the fields of an arbitrary object.

For your specific purpose I would just use pipeline instead of Supressor.jl. For example: run(pipeline(`ls`; stderr=devnull, stdout=devnull)).

Thank you, I will do so. I will also close this issue as Suppressor already has the appropriate pull request filled (if any of their maintainers are in your network, could you ping them; the pull request is languishing there).