Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-01-16 08:29:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-16 08:33:05 +0300
commitc383d742288025da1eb26417c614f56a3c500b5d (patch)
tree7b6d423bbe664a14b75e40f93493588345c566d7 /source/creator
parent7c4803367f5992f6f52e6960b3de3818b3bbd607 (diff)
Logging: add '--log-show-timestamp' option.
Part of D4214 by @sobakasu w/ edits.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator_args.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 49ae332ec36..82c62702a22 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -527,6 +527,7 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
BLI_argsPrintArgDoc(ba, "--log-level");
BLI_argsPrintArgDoc(ba, "--log-show-basename");
BLI_argsPrintArgDoc(ba, "--log-show-backtrace");
+ BLI_argsPrintArgDoc(ba, "--log-show-timestamp");
BLI_argsPrintArgDoc(ba, "--log-file");
printf("\n");
@@ -749,6 +750,15 @@ static int arg_handle_log_show_backtrace_set(int UNUSED(argc), const char **UNUS
return 0;
}
+static const char arg_handle_log_show_timestamp_set_doc[] =
+"\n\tShow a timestamp for each log message in seconds since start."
+;
+static int arg_handle_log_show_timestamp_set(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
+{
+ CLG_output_use_timestamp_set(true);
+ return 0;
+}
+
static const char arg_handle_log_file_set_doc[] =
"<filename>\n"
"\n"
@@ -1876,6 +1886,7 @@ void main_args_setup(bContext *C, bArgs *ba)
BLI_argsAdd(ba, 1, NULL, "--log-level", CB(arg_handle_log_level_set), ba);
BLI_argsAdd(ba, 1, NULL, "--log-show-basename", CB(arg_handle_log_show_basename_set), ba);
BLI_argsAdd(ba, 1, NULL, "--log-show-backtrace", CB(arg_handle_log_show_backtrace_set), ba);
+ BLI_argsAdd(ba, 1, NULL, "--log-show-timestamp", CB(arg_handle_log_show_timestamp_set), ba);
BLI_argsAdd(ba, 1, NULL, "--log-file", CB(arg_handle_log_file_set), ba);
BLI_argsAdd(ba, 1, "-d", "--debug", CB(arg_handle_debug_mode_set), ba);