What's a good way to configure logging in a kotlin...
# getting-started
j
What's a good way to configure logging in a kotlin project by code?
v
Probably depends on the logging framework you are using?
j
I'm looking for a new one if possible. I don't even know which one I'm using currently. Either logback or log4j2. I just want my logging to work and be able to easily switch between json and normal line by line format. I keep getting myself into issues over time and then my log4j2.xml file stops working. I'm fully open to completly replace it with something else and I want it to be by code and not a configuration file.
1
k
There's this: https://logging.apache.org/log4j/2.x/manual/customconfig.html - it's in Java, but you can translate.
👍 2
j
Found out my biggest issue was that I had logback in my gradle dependencies, which was the main reason for my whole pain 🥲
👍 1