Created
June 30, 2011 18:02
-
-
Save sudar/1056796 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConditionalCompile { | |
private static final Logger LOGGER = Logger.getLogger(ConditionalCompile.class); | |
private final static boolean doLogging = false; | |
public static void importantMethod( ) { | |
// Do some set up code. | |
if (doLogging) { | |
LOGGER.debug("Set up complete, beginning phases."); | |
} | |
// do first part. | |
if (doLogging) { | |
LOGGER.debug("phase1 complete"); | |
} | |
// do second part. | |
if (doLogging) { | |
LOGGER.debug("phase2 complete"); | |
} | |
// Operation Completed | |
if (doLogging) { | |
LOGGER.debug("All phases completed successfully"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment