This solution works but it will SLOW DOWN everything a lot as it will try to do a POST request each time it makes a log. So it works but I wouldn't recommend to use this.
You can follow the instruction for configuring a normal Java client instead found on https://yourusername.loggly.com/sources/setup/java_logback
Add the dependency, for maven it's like so
<dependency>
<groupId>org.logback-extensions</groupId>
<artifactId>logback-ext-loggly</artifactId>
<version>0.1.2</version>
</dependency>
Install maven, in IntelliJ this can happen automatically, or simply run
mvn clean install
Configure your logback.xml
file to have the following (if you don't have one you'll need to configure slf4j or something and make one).
You may already have a <configuration>
or <root>
tags in place, then just slide in the <appender>
and <appender-ref>
lines into the right sections
<configuration debug="true">
<appender name="loggly" class="ch.qos.logback.ext.loggly.LogglyAppender">
<endpointUrl>http://logs-01.loggly.com/inputs/d1ad1d1f-7c77-449f-a541-bc56bd6af230/tag/logback</endpointUrl>
<pattern>%d{"ISO8601", UTC} %p %t %c{0}.%M - %m%n</pattern>
</appender>
<root level="info">
<appender-ref ref="loggly" />
</root>
</configuration>