public class FormattingTriple extends Object
{}.
OSGi R7 logging adds Logger interface with methods that accept formatting arguments.
These may be directly passed through Slf4J methods, or into Log4J2, but not when using Log4J1 backend. This class
helps with missing cases.
It's a triple because it holds optional Throwable, ServiceReference and arguments array.| Modifier and Type | Method and Description |
|---|---|
static FormattingTriple |
discover(String format,
boolean printfFormatting,
Object... argArray)
According to OSGi R7 Logging specification, argument array may contain
Throwable and/or
ServiceReference among last two arguments. |
Object[] |
getArgArray() |
String |
getMessage() |
org.osgi.framework.ServiceReference<?> |
getServiceReference() |
Throwable |
getThrowable() |
static FormattingTriple |
resolve(String format,
boolean printfFormatting,
Object... argArray)
According to OSGi R7 Logging specification, argument array may contain
Throwable and/or
ServiceReference among last two arguments. |
public static FormattingTriple discover(String format, boolean printfFormatting, Object... argArray)
Throwable and/or
ServiceReference among last two arguments. This methods returns extracted information.format - printfFormatting - argArray - public static FormattingTriple resolve(String format, boolean printfFormatting, Object... argArray)
Throwable and/or
ServiceReference among last two arguments. This methods returns extracted information, also, message
is immediately resolved using discovered arguments.format - printfFormatting - argArray - public String getMessage()
public Object[] getArgArray()
public Throwable getThrowable()
public org.osgi.framework.ServiceReference<?> getServiceReference()
Copyright © 2006–2021 OPS4J - Open Participation Software for Java. All rights reserved.