myzhan / locust4j

Locust4j is a load generator for locust, written in Java.
MIT License
81 stars 30 forks source link

ClassCastException calling Locust.setVerbose(); #10

Closed lolwhitaker closed 4 years ago

lolwhitaker commented 4 years ago

Hello. I am seeing this exception:

Exception in thread "main" java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext
    at com.github.myzhan.locust4j.Locust.setVerbose(Locust.java:129)

When trying to call Locust.setVerbose(false).

myzhan commented 4 years ago

It looks like there are more loggers than logback. I can remove logback in locust4j in next version.

myzhan commented 4 years ago

fix in 1.0.8

lolwhitaker commented 4 years ago

Thanks @myzhan !

myzhan commented 4 years ago

Logback has been removed. If you want to print out logs of locust4j, you can add a logging framework like log4j to work with slf4j.