Skip to content

Commit 936ff1c

Browse files
committed
Cleanup --help output
1 parent 26b0e59 commit 936ff1c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

g13_log.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ void G13_Manager::set_log_level( ::boost::log::trivial::severity_level lvl ) {
2222
(
2323
::boost::log::trivial::severity >= lvl
2424
);
25-
G13_OUT( "set log level to " << lvl );
25+
static int set_count = 0;
26+
if( set_count ) {
27+
G13_OUT( "set log level to " << lvl );
28+
}
29+
set_count++;
2630
}
2731

2832
void G13_Manager::set_log_level( const std::string &level ) {

g13_main.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ int main(int argc, char *argv[]) {
2222
manager.set_log_level("info");
2323

2424
// Declare the supported options.
25-
po::options_description desc("Allowed options");
25+
po::options_description desc("and options can be");
2626
desc.add_options()
2727
("help", "produce help message")
2828
;
@@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
3535
add_string_option( "config", "load config commands from file" );
3636
add_string_option( "pipe_in", "specify name for input pipe" );
3737
add_string_option( "pipe_out", "specify name for output pipe" );
38-
add_string_option( "log_level", "logging level" );
38+
add_string_option( "log_level", "logging level (trace|debug|info|warning|error|fatal)" );
3939
// add_string_option( "logfile", "write log to logfile" );
4040

4141
po::positional_options_description p;
@@ -46,7 +46,10 @@ int main(int argc, char *argv[]) {
4646
po::notify(vm);
4747

4848
if (vm.count("help")) {
49-
cout << argv[0] << " : user space G13 driver" << endl;
49+
cout << "g13d, a user space G13 driver" << endl;
50+
51+
cout << "Usage : " << argv[0] << " options logo_filename" << endl;
52+
cout << " where logo_filename is optional ";
5053
cout << desc << "\n";
5154
return 1;
5255
}

0 commit comments

Comments
 (0)