Closed raytiley closed 5 years ago
The additional writers are special in two regards:
Or put the other way: the log specification only influences the default logger.
How would you want it for your "sibling of the default writer" - filtered by the log specification, or always called? In the latter case, your implementation could still have its own filtering mechanism, but this additional flexibility would come with increased overall complexity.
I provided an implementation in branch add_default_writer. Would be great if you could test it and give feedback!
I think the additional default writer should inherit the log specification from the default writer. I think this is the expected behavior by users.
@emabee I tested the add_default_writer
branch and it worked like a charm!
Great, thanks! I just published 0.14.3 with the change from add_default_writer.
I might be missing something but it seems like the
add_writer
requires calling all the logging macros with a target. I can't see any way to add an additional writer that always get's used.Would adding some way to add writers that always get logged to be accepted?
My use case is I want to write a custom writer for the windows event viewer but also use the file log writer to keep text logs for my application.
Thanks!