logger: improve, sort and slice up usage() help text

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
This commit is contained in:
Benno Schulenberg 2011-08-15 14:04:20 +02:00 committed by Karel Zak
parent 415b61fc31
commit 0050c52917
1 changed files with 14 additions and 12 deletions

View File

@ -137,22 +137,24 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
{ {
fprintf(out, fprintf(out,
_("\nUsage:\n" _("\nUsage:\n"
" %s [options] message\n"), " %s [options] [message]\n"),
program_invocation_short_name); program_invocation_short_name);
fprintf(out, _( fprintf(out, _(
"\nOptions:\n" "\nOptions:\n"
" -i, --id log process id\n" " -d, --udp use UDP (TCP is default)\n"
" -s, --stderr log message to standard error as well\n" " -i, --id log the process ID too\n"
" -f, --file FILE log contents of the specified file\n" " -f, --file FILE log the contents of this file\n"
" -p, --priority PRI enter message priority\n" " -h, --help display this help text and exit\n"));
" -t, --tag TAG mark every line with tag\n" fprintf(out, _(
" -u, --socket SOCK write to socket\n" " -n, --server NAME write to this remote syslog server\n"
" -d, --udp use udp (tcp is default)\n" " -P, --port NUMBER use this UDP port\n"
" -n, --server ADDR write to remote syslog server\n" " -p, --priority PRIO mark given message with this priority\n"
" -P, --port define port number\n" " -s, --stderr output message to standard error as well\n"));
" -V, --version output version information and exit\n" fprintf(out, _(
" -h, --help display this help and exit\n\n")); " -t, --tag TAG mark every line with this tag\n"
" -u, --socket SOCKET write to this Unix socket\n"
" -V, --version output version information and exit\n\n"));
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
} }