borntyping / rust-simple_logger

A rust logger that prints all messages with a readable output format.
https://crates.io/crates/simple_logger
MIT License
220 stars 48 forks source link

Feature: Initialize simple logger with custom logging-backend. #85

Closed fslongjin closed 8 months ago

fslongjin commented 8 months ago

Feature: Initialize simple logger with custom logging-backend.

fslongjin commented 8 months ago

ping

borntyping commented 8 months ago

I'm very conflicted on this PR - it's cleanly implemented and well documented, but it isn't something I want to include in a logging library that aims to be very simple (and low-effort to maintain) so I don't plan to merge it. Thank you for your efforts anyway!

(More specifically, simple_logger is already a logging backend for the log library, and makes a lot of choices that make it very specific to terminal output that wouldn't make sense for any other backend like files or external services. If you're partically intrested in using the output format in another backend, splitting the text formatting out from printing so it could be called from another library might make sense. Or if this is something you have plans to expand on, I absolutely endorse forking it and using it as a base to build on.)