How to Configure the Logback appender in my java application

My application already using the log4j properties to print the logs. Now I like to view those logs in Grafana through loki.

I have installed LOKI and the service is up and running in localhost:3100/metrics and connected the loki service with grafana.

Now I need to pass the log files to LOKI through logback appender. I am not sure how to configure logback appender in my application.

Could some one help me on this

As I replied to similar question here.

You need to have a library in your pom that implements the appender for sending data to Loki. If you are using log4j2 then the library I wrote might be useful to you: tjahzi/log4j2-appender at master · tkowalcz/tjahzi · GitHub

If you are using Logback then you have two options, see my post from the first link.

Cheers.