Changeset View
Changeset View
Standalone View
Standalone View
source/creator/creator_args.c
| Show First 20 Lines • Show All 522 Lines • ▼ Show 20 Lines | static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) | ||||
| printf("\n"); | printf("\n"); | ||||
| printf("Logging Options:\n"); | printf("Logging Options:\n"); | ||||
| BLI_argsPrintArgDoc(ba, "--log"); | BLI_argsPrintArgDoc(ba, "--log"); | ||||
| BLI_argsPrintArgDoc(ba, "--log-level"); | BLI_argsPrintArgDoc(ba, "--log-level"); | ||||
| BLI_argsPrintArgDoc(ba, "--log-show-basename"); | BLI_argsPrintArgDoc(ba, "--log-show-basename"); | ||||
| BLI_argsPrintArgDoc(ba, "--log-show-backtrace"); | BLI_argsPrintArgDoc(ba, "--log-show-backtrace"); | ||||
| BLI_argsPrintArgDoc(ba, "--log-show-timestamp"); | BLI_argsPrintArgDoc(ba, "--log-show-timestamp"); | ||||
| BLI_argsPrintArgDoc(ba, "--log-show-stdout"); | |||||
| BLI_argsPrintArgDoc(ba, "--log-file"); | BLI_argsPrintArgDoc(ba, "--log-file"); | ||||
| printf("\n"); | printf("\n"); | ||||
| printf("Debug Options:\n"); | printf("Debug Options:\n"); | ||||
| BLI_argsPrintArgDoc(ba, "--debug"); | BLI_argsPrintArgDoc(ba, "--debug"); | ||||
| BLI_argsPrintArgDoc(ba, "--debug-value"); | BLI_argsPrintArgDoc(ba, "--debug-value"); | ||||
| printf("\n"); | printf("\n"); | ||||
| ▲ Show 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| /* Ensure types don't become incompatible. */ | /* Ensure types don't become incompatible. */ | ||||
| void (*fn)(FILE *fp) = BLI_system_backtrace; | void (*fn)(FILE *fp) = BLI_system_backtrace; | ||||
| CLG_backtrace_fn_set((void (*)(void *))fn); | CLG_backtrace_fn_set((void (*)(void *))fn); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| static const char arg_handle_log_show_timestamp_set_doc[] = | static const char arg_handle_log_show_timestamp_set_doc[] = | ||||
| "\n\tShow a timestamp for each log message in seconds since start." | "\n\tShow a timestamp for each log message." | ||||
| ; | ; | ||||
| static int arg_handle_log_show_timestamp_set(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) | static int arg_handle_log_show_timestamp_set(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) | ||||
| { | { | ||||
| CLG_output_use_timestamp_set(true); | CLG_output_use_timestamp_set(true); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| static const char arg_handle_log_show_stdout_set_doc[] = | |||||
| "\n\tSend log output to the stdout (use when logging to a file)." | |||||
| ; | |||||
| static int arg_handle_log_show_stdout_set(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) | |||||
| { | |||||
| CLG_output_use_stdout_set(true); | |||||
| return 0; | |||||
| } | |||||
| static const char arg_handle_log_file_set_doc[] = | static const char arg_handle_log_file_set_doc[] = | ||||
| "<filename>\n" | "<filename>\n" | ||||
| "\n" | "\n" | ||||
| "\tSet a file to output the log to." | "\tSet a file to output the log to." | ||||
| ; | ; | ||||
| static int arg_handle_log_file_set(int argc, const char **argv, void *UNUSED(data)) | static int arg_handle_log_file_set(int argc, const char **argv, void *UNUSED(data)) | ||||
| { | { | ||||
| const char *arg_id = "--log-file"; | const char *arg_id = "--log-file"; | ||||
| ▲ Show 20 Lines • Show All 1,112 Lines • ▼ Show 20 Lines | #define CB_EX(a, b) a##_doc_##b, a | ||||
| BLI_argsAdd(ba, 1, "-a", NULL, CB(arg_handle_playback_mode), NULL); | BLI_argsAdd(ba, 1, "-a", NULL, CB(arg_handle_playback_mode), NULL); | ||||
| BLI_argsAdd(ba, 1, NULL, "--log", CB(arg_handle_log_set), ba); | BLI_argsAdd(ba, 1, NULL, "--log", CB(arg_handle_log_set), ba); | ||||
| BLI_argsAdd(ba, 1, NULL, "--log-level", CB(arg_handle_log_level_set), 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-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-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-show-timestamp", CB(arg_handle_log_show_timestamp_set), ba); | ||||
| BLI_argsAdd(ba, 1, NULL, "--log-show-stdout", CB(arg_handle_log_show_stdout_set), ba); | |||||
| BLI_argsAdd(ba, 1, NULL, "--log-file", CB(arg_handle_log_file_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); | BLI_argsAdd(ba, 1, "-d", "--debug", CB(arg_handle_debug_mode_set), ba); | ||||
| #ifdef WITH_FFMPEG | #ifdef WITH_FFMPEG | ||||
| BLI_argsAdd(ba, 1, NULL, "--debug-ffmpeg", | BLI_argsAdd(ba, 1, NULL, "--debug-ffmpeg", | ||||
| CB_EX(arg_handle_debug_mode_generic_set, ffmpeg), (void *)G_DEBUG_FFMPEG); | CB_EX(arg_handle_debug_mode_generic_set, ffmpeg), (void *)G_DEBUG_FFMPEG); | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines | |||||