From 6ee9528fe7237da06e569be8bfec1092391eb33e Mon Sep 17 00:00:00 2001 From: asofold Date: Thu, 22 Oct 2015 00:48:02 +0200 Subject: [PATCH] Add convenience methods to DebugUtil. --- .../nocheatplus/logging/debug/DebugUtil.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/logging/debug/DebugUtil.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/logging/debug/DebugUtil.java index a509b28d..39cae1bb 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/logging/debug/DebugUtil.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/logging/debug/DebugUtil.java @@ -295,6 +295,24 @@ public class DebugUtil { NCPAPIProvider.getNoCheatPlusAPI().getLogManager().debug(Streams.TRACE_FILE, builder.toString()); } + /** + * Debug to TRACE_FILE. + * @return The given returnValue. + */ + public static boolean debug(String message, boolean returnValue) { + NCPAPIProvider.getNoCheatPlusAPI().getLogManager().debug(Streams.TRACE_FILE, message); + return returnValue; + } + + /** + * Debug to TRACE_FILE. + * @param message + * @return + */ + public static void debug(String message) { + NCPAPIProvider.getNoCheatPlusAPI().getLogManager().debug(Streams.TRACE_FILE, message); + } + public static String toJava(final double[] doubles) { final StringBuilder builder = new StringBuilder(20 + doubles.length * 20); toJava(doubles, builder); @@ -320,7 +338,7 @@ public class DebugUtil { } builder.append("}"); } - + // TODO: method to log raytracing/recorder directly with prefix message. }