1 |
|
//---PACKAGE DECLARATION--- |
2 |
< |
package uk.ac.ukc.iscream.util; |
2 |
> |
package uk.org.iscream.util; |
3 |
|
|
4 |
|
//---IMPORTS--- |
5 |
|
import java.util.Date; |
64 |
|
* @return The string to be written to the log. |
65 |
|
*/ |
66 |
|
public static String formatLogLine(String source, int verbosity, String message){ |
67 |
< |
String date = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM).format(new Date()); |
67 |
> |
String date = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM, Locale.UK).format(new Date()); |
68 |
|
return "[" + date + "] [" + VERBOSITY_NAMES[verbosity] + "] " + source + ": " + message; |
69 |
|
} |
70 |
|
|
71 |
|
/** |
72 |
< |
* If the class name begins with uk.ac.ukc.iscream |
72 |
> |
* If the class name begins with uk.org.iscream |
73 |
|
* this method will trim it off, otherwise it |
74 |
|
* leaves the string unchanged. |
75 |
|
* |
78 |
|
* @return the tidy version of it |
79 |
|
*/ |
80 |
|
private static String tidyClassName(String className) { |
81 |
< |
if (className.startsWith("uk.ac.ukc.iscream")) { |
81 |
> |
if (className.startsWith("uk.org.iscream")) { |
82 |
|
return className.substring(18); |
83 |
|
} |
84 |
|
return className; |