code: @SuppressWarnings("regexpsinglelinejava")
      private static void print(final String message, final Object... args) {
          if (DEBUG) {
              final String logMessage;
              if (args.length == 0) {
                  logMessage = message;
              } else {
                  for (int i = 0; i < args.length; ++i) {
                      // arguments may be null
                      if (args[i] == null) {
                          continue;
                      }
                      if (args[i].getClass().isArray()) {
                          // cast back to array! Note that primitive arrays are not supported
                          args[i] = Arrays.toString((Object[])args[i]);
                      } else if (args[i] == Class.class) {
                          args[i] = ((Class<?>)args[i]).getName();
                      }
                  }
                  logMessage = String.format(message, args);
              }
              System.out.println(logMessage);
          }
      }
docs: Helper method for simple (debug) logging.