projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tidy up logging a bit. Make it configurable from the GUI.
[dcpomatic.git]
/
src
/
tools
/
dcpomatic_cli.cc
diff --git
a/src/tools/dcpomatic_cli.cc
b/src/tools/dcpomatic_cli.cc
index a74ece149af2b9e96e7cd46103917dec5bfe98f1..73067f406d559996ee3255157b1315edde14b039 100644
(file)
--- a/
src/tools/dcpomatic_cli.cc
+++ b/
src/tools/dcpomatic_cli.cc
@@
-65,7
+65,7
@@
main (int argc, char* argv[])
string film_dir;
bool progress = true;
bool no_remote = false;
string film_dir;
bool progress = true;
bool no_remote = false;
-
int log_level = 0
;
+
string log_types = "general,warning,error"
;
int json_port = 0;
bool keep_going = false;
int json_port = 0;
bool keep_going = false;
@@
-78,7
+78,7
@@
main (int argc, char* argv[])
{ "flags", no_argument, 0, 'f'},
{ "no-progress", no_argument, 0, 'n'},
{ "no-remote", no_argument, 0, 'r'},
{ "flags", no_argument, 0, 'f'},
{ "no-progress", no_argument, 0, 'n'},
{ "no-remote", no_argument, 0, 'r'},
- { "log-
level
", required_argument, 0, 'l' },
+ { "log-
types
", required_argument, 0, 'l' },
{ "json", required_argument, 0, 'j' },
{ "keep-going", no_argument, 0, 'k' },
{ 0, 0, 0, 0 }
{ "json", required_argument, 0, 'j' },
{ "keep-going", no_argument, 0, 'k' },
{ 0, 0, 0, 0 }
@@
-110,7
+110,7
@@
main (int argc, char* argv[])
no_remote = true;
break;
case 'l':
no_remote = true;
break;
case 'l':
- log_
level = atoi (optarg)
;
+ log_
types = optarg
;
break;
case 'j':
json_port = atoi (optarg);
break;
case 'j':
json_port = atoi (optarg);
@@
-155,7
+155,7
@@
main (int argc, char* argv[])
exit (EXIT_FAILURE);
}
exit (EXIT_FAILURE);
}
- film->log()->set_
level ((Log::Level) log_level
);
+ film->log()->set_
types (log_types
);
cout << "\nMaking DCP for " << film->name() << "\n";
// cout << "Content: " << film->content() << "\n";
cout << "\nMaking DCP for " << film->name() << "\n";
// cout << "Content: " << film->content() << "\n";