enum output_format default_output_format = OUTPUT_FORMAT_JSON;
int claim_mode = 1;
bool progress_use_cr = 0;
+bool timestamps = 0;
int max_grant_frames = -1;
int max_maptrack_frames = -1;
libxl_domid domid_policy = INVALID_DOMID;
int ret;
void *config_data = 0;
int config_len = 0;
+ unsigned int xtl_flags = 0;
- while ((opt = getopt(argc, argv, "+vftN")) >= 0) {
+ while ((opt = getopt(argc, argv, "+vftTN")) >= 0) {
switch (opt) {
case 'v':
if (minmsglevel > 0) minmsglevel--;
case 't':
progress_use_cr = 1;
break;
+ case 'T':
+ timestamps = 1;
+ break;
default:
fprintf(stderr, "unknown global option\n");
exit(EXIT_FAILURE);
}
opterr = 0;
- logger = xtl_createlogger_stdiostream(stderr, minmsglevel,
- (progress_use_cr ? XTL_STDIOSTREAM_PROGRESS_USE_CR : 0));
+ if (progress_use_cr)
+ xtl_flags |= XTL_STDIOSTREAM_PROGRESS_USE_CR;
+ if (timestamps)
+ xtl_flags |= XTL_STDIOSTREAM_SHOW_DATE | XTL_STDIOSTREAM_SHOW_PID;
+ logger = xtl_createlogger_stdiostream(stderr, minmsglevel, xtl_flags);
if (!logger) exit(EXIT_FAILURE);
xl_ctx_alloc();
struct cmd_spec *cmd;
if (!command || !strcmp(command, "help")) {
- printf("Usage xl [-vfN] <subcommand> [args]\n\n");
+ printf("Usage xl [-vfNtT] <subcommand> [args]\n\n");
printf("xl full list of subcommands:\n\n");
for (i = 0; i < cmdtable_len; i++) {
printf(" %-19s ", cmd_table[i].cmd_name);
} else {
cmd = cmdtable_lookup(command);
if (cmd) {
- printf("Usage: xl [-v%s%s] %s %s\n\n%s.\n\n",
+ printf("Usage: xl [-vtT%s%s] %s %s\n\n%s.\n\n",
cmd->modifies ? "f" : "",
cmd->can_dryrun ? "N" : "",
cmd->cmd_name,
} else {
verbose_len = (minmsglevel_default - minmsglevel) + 2;
}
- xasprintf(&rune, "exec %s %s xl%s%.*s migrate-receive%s%s%s",
+ xasprintf(&rune, "exec %s %s xl%s%s%.*s migrate-receive%s%s%s",
ssh_command, host,
pass_tty_arg ? " -t" : "",
+ timestamps ? " -T" : "",
verbose_len, verbose_buf,
daemonize ? "" : " -e",
debug ? " -d" : "",