BrunoBonacci / mulog

μ/log is a micro-logging library that logs events and data, not words!
https://cljdoc.org/d/com.brunobonacci/mulog/
Apache License 2.0
490 stars 48 forks source link

More flexible destinations for file writer #87

Closed emlyn closed 2 years ago

emlyn commented 2 years ago

It would be useful to allow writing logs to other places than a local file. This change allows it to accept anything that can be coerced into a writer (such as e.g. a Hadoop FSDataOutputStream for writing to a remote filesystem). The current behaviour of creating the parent directories is maintained if the filename passed in is a string (or a File object).

emlyn commented 2 years ago

I realise that filename isn't necessarily the best name for this config after this change; ideally it would be something more generic (output-location? destination?), but I'm not sure it warrants breaking compatibility.

BrunoBonacci commented 2 years ago

thank you!