Class LogArg

java.lang.Object
org.sonarsource.slang.utils.LogArg

public class LogArg extends Object
slf4j does not support lambda argument, so this object wrap the lambda into an object that invoke the lambda when toString is called by the logger.
  • Constructor Details

  • Method Details

    • lazyArg

      public static Object lazyArg(Supplier<String> supplier)
      wrap a lambda that will only be called by the logger when the toString is called.
    • toString

      public String toString()
      Overrides:
      toString in class Object