From e1e7827d75df6ea11b6bfd2aabd3eb3fb1f2e701 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 1 Oct 2012 22:40:09 +0100 Subject: Some more debug logging. --- src/tools/makedcp.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/makedcp.cc b/src/tools/makedcp.cc index c6cb1ba14..d3608059c 100644 --- a/src/tools/makedcp.cc +++ b/src/tools/makedcp.cc @@ -34,6 +34,7 @@ #include "version.h" #include "cross.h" #include "config.h" +#include "log.h" using namespace std; using namespace boost; @@ -58,6 +59,7 @@ main (int argc, char* argv[]) string film_dir; bool test_mode = false; bool progress = true; + int log_level = 1; int option_index = 0; while (1) { @@ -68,10 +70,11 @@ main (int argc, char* argv[]) { "config", no_argument, 0, 'c'}, { "test", no_argument, 0, 't'}, { "no-progress", no_argument, 0, 'n'}, + { "log-level", required_argument, 0, 'l' }, { 0, 0, 0, 0 } }; - int c = getopt_long (argc, argv, "vhdctn", long_options, &option_index); + int c = getopt_long (argc, argv, "vhdctnl:", long_options, &option_index); if (c == -1) { break; @@ -102,6 +105,9 @@ main (int argc, char* argv[]) cout << "built in optimised mode\n"; #endif exit (EXIT_SUCCESS); + case 'l': + log_level = atoi (optarg); + break; } } @@ -134,6 +140,8 @@ main (int argc, char* argv[]) exit (EXIT_FAILURE); } + film->log()->set_level ((Log::Level) log_level); + cout << "\nMaking "; if (film->dcp_ab ()) { cout << "A/B "; -- cgit v1.2.3