I have a Scala
package, that should be logged from top to bottom although I want it to be purely functional. Is there any way to implement logging without breaking functional style?
https://github.com/ChristopherDavenport/log4cats - it has been done.
If you need side-effects (and you do) and you care about FP you have to do them in areferentially transparent way. Which basically means wrapping side wffects with IO monad of some sort.
So, all you need to do is to defer logging into some IO monad. One library doing this for you is log4cats.
However, many people, quite often treat logging as an exception (similarly to allocation and reading configs, instrumentation, etc) to the "purely functional" rule, even more so if in project there is a lot of people who don't understand IO monads very well yet, so nobody should lynch you if initially you'll use ScalaLogging and won't bother with RT in this regard.
Later on you can move on to full FP, Cats Effect, IOApp or TaskApp (if Monix) and then something like log4cats would provide type classes for logging for you.