Exception java.nio.charset.UnsupportedCharsetException:
cp65001 in 2.9.0. Add another service to low-level error reporting.
@@ -33,6 +33,18 @@ final class LowLevelLogUtil {
private static PrintWriter writer = new PrintWriter(System.err, true);
+ /**
+ * Logs the given message.
+ *
+ * @param message the message to log
+ * @since 2.9.2
+ */
+ public static void log(final String message) {
+ if (message != null) {
+ writer.println(message);
+ }
+ }
+
public static void logException(final Throwable exception) {
if (exception != null) {
exception.printStackTrace(writer);
@@ -40,9 +52,7 @@ final class LowLevelLogUtil {
}
public static void logException(final String message, final Throwable exception) {
- if (message != null) {
- writer.println(message);
- }
+ log(message);
logException(exception);
}
