Class FormattingTriple
- java.lang.Object
-
- org.ops4j.pax.logging.spi.support.FormattingTriple
-
public class FormattingTriple extends Object
Extension of Slf4J's class that helps with messages containing placeholders{}. OSGi R7 logging addsLoggerinterface with methods that accept formatting arguments. These may be directly passed through Slf4J methods, or into Log4J2. This class helps with missing cases. It's a triple because it holds optionalThrowable,ServiceReferenceand arguments array.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FormattingTriplediscover(String format, boolean printfFormatting, Object... argArray)According to OSGi R7 Logging specification, argument array may containThrowableand/orServiceReferenceamong last two arguments.Object[]getArgArray()StringgetMessage()org.osgi.framework.ServiceReference<?>getServiceReference()ThrowablegetThrowable()static FormattingTripleresolve(String format, boolean printfFormatting, Object... argArray)According to OSGi R7 Logging specification, argument array may containThrowableand/orServiceReferenceamong last two arguments.
-
-
-
Method Detail
-
discover
public static FormattingTriple discover(String format, boolean printfFormatting, Object... argArray)
According to OSGi R7 Logging specification, argument array may containThrowableand/orServiceReferenceamong last two arguments. This methods returns extracted information.- Parameters:
format-printfFormatting-argArray-- Returns:
-
resolve
public static FormattingTriple resolve(String format, boolean printfFormatting, Object... argArray)
According to OSGi R7 Logging specification, argument array may containThrowableand/orServiceReferenceamong last two arguments. This methods returns extracted information, also, message is immediately resolved using discovered arguments.- Parameters:
format-printfFormatting-argArray-- Returns:
-
getMessage
public String getMessage()
-
getArgArray
public Object[] getArgArray()
-
getThrowable
public Throwable getThrowable()
-
getServiceReference
public org.osgi.framework.ServiceReference<?> getServiceReference()
-
-