MCPcopy Index your code
hub / github.com/dianping/cat / validate

Method validate

lib/java/src/main/java/com/dianping/cat/Cat.java:663–678  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

661 }
662
663 private static void validate() {
664 String enable = Properties.forString().fromEnv().fromSystem().getProperty("CAT_ENABLED", "true");
665
666 if ("false".equals(enable)) {
667 CatLogger.getInstance().info("CAT is disable due to system environment CAT_ENABLED is false.");
668
669 enabled = false;
670 } else {
671 String customDomain = getCustomDomain();
672
673 if (customDomain == null && UNKNOWN.equals(ApplicationEnvironment.loadAppName(UNKNOWN))) {
674 CatLogger.getInstance().info("CAT is disable due to no app name in resource file /META-INF/app.properties");
675 enabled = false;
676 }
677 }
678 }
679
680 private Cat() {
681 }

Callers 1

initializeInternalMethod · 0.95

Calls 9

forStringMethod · 0.95
getInstanceMethod · 0.95
getCustomDomainMethod · 0.95
loadAppNameMethod · 0.95
fromSystemMethod · 0.80
fromEnvMethod · 0.80
getPropertyMethod · 0.65
equalsMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected