const char *ctdb_base;
struct conf_context *conf;
const char *logging_location;
- const char *t;
+ const char *test_mode;
bool ok;
/*
* Logging setup/options
*/
+ test_mode = getenv("CTDB_TEST_MODE");
+
/* Log to stderr (ignoring configuration) when running as interactive */
if (interactive) {
logging_location = "file:";
logging_location = logging_conf_location(conf);
}
- if (strcmp(logging_location, "syslog") != 0) {
+ if (strcmp(logging_location, "syslog") != 0 && test_mode == NULL) {
/* This can help when CTDB logging is misconfigured */
syslog(LOG_DAEMON|LOG_NOTICE,
"CTDB logging to location %s",
* Testing and debug options
*/
- t = getenv("CTDB_TEST_MODE");
- if (t != NULL) {
+ if (test_mode != NULL) {
ctdb->do_setsched = false;
ctdb->do_checkpublicip = false;
fast_start = true;