| 539 | } |
| 540 | |
| 541 | private static String getProperty(final Properties properties, String key) { |
| 542 | if (envEnabled) { |
| 543 | final String envKey = "QDB_LOG_" + key.replace('.', '_').toUpperCase(); |
| 544 | final String envValue = System.getenv(envKey); |
| 545 | if (envValue == null) { |
| 546 | return properties.getProperty(key); |
| 547 | } |
| 548 | System.err.println(" Using env: " + envKey + "=" + envValue); |
| 549 | return envValue; |
| 550 | } |
| 551 | return properties.getProperty(key); |
| 552 | } |
| 553 | |
| 554 | private static boolean isForcedDebug() { |
| 555 | return System.getProperty(DEBUG_TRIGGER) != null || System.getenv().containsKey(DEBUG_TRIGGER_ENV); |