I am currently working on a relatively large project in Kotlin. I would like to implement a logging method, however for many reasons (notably because I need a very specific type of clock management and a wide variety of appenders which will be a pain to implement in other frameworks), I cannot use typical logging frameworks like Log4J.
I would like - if possible - to be able to log from all classes without explicitly passing them a Logger object. I like the logging scheme that Kotlin-logging provides (with the use of a companion object), but it uses existing frameworks, which is a no-go.
In a way, what I need is some way to define a global logger. Any recommendations? Singletons and companion objects are probably part of the solution, but I don't really see how to build something handy.
Note: I need one of the appenders to write to ZMQ, so I would prefer to avoid instantiating multiple loggers.