Package org.slf4j.helpers
Class NormalizedParameters
- java.lang.Object
-
- org.slf4j.helpers.NormalizedParameters
-
public class NormalizedParameters extends Object
Holds normalized call parameters. Includes utility methods such asnormalize(String, Object[], Throwable)to help the normalization of parameters.- Since:
- 2.0
- Author:
- ceki
-
-
Constructor Summary
Constructors Constructor Description NormalizedParameters(String message, Object[] arguments)NormalizedParameters(String message, Object[] arguments, Throwable throwable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getArguments()StringgetMessage()ThrowablegetThrowable()static ThrowablegetThrowableCandidate(Object[] argArray)static NormalizedParametersnormalize(String msg, Object[] arguments, Throwable t)This method serves to normalize logging call invocation parameters.static NormalizedParametersnormalize(LoggingEvent event)static Object[]trimmedCopy(Object[] argArray)Helper method to get all but the last element of an array
-
-
-
Method Detail
-
getMessage
public String getMessage()
-
getArguments
public Object[] getArguments()
-
getThrowable
public Throwable getThrowable()
-
trimmedCopy
public static Object[] trimmedCopy(Object[] argArray)
Helper method to get all but the last element of an array- Parameters:
argArray- The arguments from which we want to remove the last element- Returns:
- a copy of the array without the last element
-
normalize
public static NormalizedParameters normalize(String msg, Object[] arguments, Throwable t)
This method serves to normalize logging call invocation parameters. More specifically, if a throwable argument is not supplied directly, it attempts to extract it from the argument array.
-
normalize
public static NormalizedParameters normalize(LoggingEvent event)
-
-