Log all HashMap keys and values using slf4j Logger

Viewed 26048

How can I log HashMap keys and values using slf4j logger. I've trying this a couple of times but still figured out.

The following code just only logs the "test values" string without the values of maps arguments.

  public void test(HashMap maps) {
      logger.info("test values", maps);
  }
2 Answers
Related