()
| 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 | } |
no test coverage detected