ovh / rust-gelf_logger

Minimal rust logger to send log entries in GELF.
BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

Provide direct access to live logger #7

Closed hlb8122 closed 3 years ago

hlb8122 commented 4 years ago

Libraries like MultiLog require that you supply a Logger. I can't see a way right now to instantiate the logger without consuming it.

hlb8122 commented 4 years ago

GelfLogger::new could take the Config struct?

If you held the sender inside GelfLogger you could perhaps remove the unsafe code blocks. The thread could start either on new or on the first log perhaps.