sh0nk / matplotlib4j

Matplotlib for java: A simple graph plot library for java, scala and kotlin with powerful python matplotlib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable "WARN PyCommand: "

hangimiz opened this issue · comments

Thanks for this software. It works great for me, except I am getting "WARN PyCommand: " printed to console. I don't see what the warning is. Is there an easy way to do disable the logging?

I figured it out. In case it's useful for anyone else:

import com.github.sh0nk.matplotlib4j.PyCommand;
import org.apache.log4j.*;

public class MyClass {
   private static org.apache.log4j.Logger matplotlib4jLog = org.apache.log4j.Logger.getLogger(PyCommand.class);

   public static void main(String[] args) {
        matplotlib4jLog.setLevel(Level.OFF);

reference: https://www.tutorialspoint.com/log4j/log4j_logging_levels.htm