1 package org.jastacry; 2 3 import org.apache.logging.log4j.Logger; 4 5 import net.sourceforge.cobertura.CoverageIgnore; 6 7 /** 8 * Global static functions are stored here. 9 * 10 * <p>SPDX-License-Identifier: MIT 11 * 12 * @author Kai Kretschmann 13 */ 14 public final class GlobalFunctions 15 { 16 17 /** 18 * Log debugging only if switched on via command line and log4j. 19 * 20 * @param isVerbose boolean 21 * @param logger log4j Logger object 22 * @param sFormat Formatting string 23 * @param arguments variable arguments 24 */ 25 public static void logDebug(final boolean isVerbose, final Logger logger, final String sFormat, final Object... arguments) 26 { 27 if (isVerbose) 28 { 29 logger.debug(sFormat, () -> arguments); 30 } // if 31 } // function 32 33 /** 34 * Hidden constructor. 35 */ 36 @CoverageIgnore 37 private GlobalFunctions() 38 { 39 // not called 40 } 41 42 } // class