void _dout_open_log()
{
// logging enabled?
- if (!(g_conf.log_dir && g_conf.file_logs)) {
+ if (!g_conf.log_dir || g_conf.log_to_stdout) {
_dout_need_open = false;
return;
}
int _dout_rename_output_file() // after calling daemon()
{
- if (g_conf.log_dir && g_conf.file_logs) {
+ if (g_conf.log_dir && !g_conf.log_to_stdout) {
char oldpath[1000];
char hostname[80];
gethostname(hostname, 79);
int _dout_create_courtesy_output_symlink(const char *type, int n)
{
- if (g_conf.log_dir && g_conf.file_logs) {
+ if (g_conf.log_dir && !g_conf.log_to_stdout) {
if (_dout_need_open)
_dout_open_log();
num_osd: 4,
num_client: 1,
- mkfs: false,
-
monmap_file: ".ceph_monmap",
mon_host: 0,
daemonize: false,
- file_logs: false,
// profiling and debugging
logger: true,
log_dir: INSTALL_PREFIX "/var/log/ceph", // if daemonize == true
log_sym_dir: INSTALL_PREFIX "/var/log/ceph", // if daemonize == true
+ log_to_stdout: true,
pid_file: 0,
fake_clock: false,
fakemessenger_serialize: true,
- osd_remount_at: 0,
-
kill_after: 0,
- tick: 0,
-
debug: 0,
debug_lockdep: 0,
debug_mds: 1,
CF_READ("global", "num mon", num_mon);
CF_READ("global", "num mds", num_mds);
CF_READ("global", "num osd", num_osd);
- CF_READ("global", "mkfs", mkfs);
CF_READ_STR("global", "monmap file", monmap_file);
CF_READ("global", "daemonize", daemonize);
- CF_READ("global", "file logs", file_logs);
+ CF_READ("global", "log to stdout", log_to_stdout);
CF_READ("global", "logger", logger);
CF_READ("global", "logger interval", logger_interval);
CF_READ_STR("global", "logger calc variance", logger_subdir);
else if ((strcmp(args[i], "--daemonize") == 0 ||
strcmp(args[i], "-d") == 0) && isarg) {
g_conf.daemonize = true;
- g_conf.file_logs = true;
+ g_conf.log_to_stdout = false;
} else if ((strcmp(args[i], "--foreground") == 0 ||
strcmp(args[i], "-f") == 0) && isarg) {
g_conf.daemonize = false;
- g_conf.file_logs = true;
+ g_conf.log_to_stdout = false;
}
else if (strcmp(args[i], "--ms_stripe_osds") == 0)
i += 2;
}
- else if (strcmp(args[i], "--osd_remount_at") == 0 && isarg)
- g_conf.osd_remount_at = atoi(args[++i]);
- //else if (strcmp(args[i], "--fake_osd_sync") == 0)
- //g_conf.fake_osd_sync = atoi(args[++i]);
-
-
else if (strcmp(args[i], "--log_dir") == 0 && isarg)
g_conf.log_dir = args[++i];
else if (//strcmp(args[i], "-o") == 0 ||
else if (strcmp(args[i], "--kill_after") == 0 && isarg)
g_conf.kill_after = atoi(args[++i]);
- else if (strcmp(args[i], "--tick") == 0 && isarg)
- g_conf.tick = atoi(args[++i]);
else if (strcmp(args[i], "--file_layout_unit") == 0 && isarg)
g_default_file_layout.fl_stripe_unit = atoi(args[++i]);