Package com.sun.jts.utils
Class LogFormatter
- java.lang.Object
-
- com.sun.jts.utils.LogFormatter
-
public class LogFormatter extends Object
This class is used to format the trace record.- Version:
- 1.0
- Author:
- K Venugopal
-
-
Constructor Summary
Constructors Constructor Description LogFormatter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
convertPropsToString(Properties prop)
Helper method to convert properties to string.static String
convertToString(byte[] byteArray)
Helper method to convert a byte arror to string.static String
convertXidArrayToString(Xid[] xidArray)
Converts an array of xids to string that can be printed.static String
getLocalizedMessage(Logger logger, String key)
getLocalizedMessage is used to localize the messages being used in exceptionsstatic String
getLocalizedMessage(Logger logger, String key, Object[] args)
getLocalizedMessage is used to localize the messages being used in exceptions with arguments inserted appropriately.
-
-
-
Method Detail
-
convertToString
public static String convertToString(byte[] byteArray)
Helper method to convert a byte arror to string. This is typically used for printing Xids.- Parameters:
byteArray
- abyte[]
value- Returns:
- a
String
value
-
convertXidArrayToString
public static String convertXidArrayToString(Xid[] xidArray)
Converts an array of xids to string that can be printed. Its a helper method.- Parameters:
xidArray
- aXid[]
value- Returns:
- a
String
value
-
convertPropsToString
public static String convertPropsToString(Properties prop)
Helper method to convert properties to string.- Parameters:
prop
- aProperties
value- Returns:
- a
String
value
-
getLocalizedMessage
public static String getLocalizedMessage(Logger logger, String key)
getLocalizedMessage is used to localize the messages being used in exceptions
-
-