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 StringconvertPropsToString(Properties prop)Helper method to convert properties to string.static StringconvertToString(byte[] byteArray)Helper method to convert a byte arror to string.static StringconvertXidArrayToString(Xid[] xidArray)Converts an array of xids to string that can be printed.static StringgetLocalizedMessage(Logger logger, String key)getLocalizedMessage is used to localize the messages being used in exceptionsstatic StringgetLocalizedMessage(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
Stringvalue
-
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
Stringvalue
-
convertPropsToString
public static String convertPropsToString(Properties prop)
Helper method to convert properties to string.- Parameters:
prop- aPropertiesvalue- Returns:
- a
Stringvalue
-
getLocalizedMessage
public static String getLocalizedMessage(Logger logger, String key)
getLocalizedMessage is used to localize the messages being used in exceptions
-
-