mirror of
https://github.com/MatthiasPetermann/netbsd_exporter.git
synced 2025-10-25 20:01:59 +00:00
Partially revert previous changes - we will again log to syslog by default but avoid filling the log with useless success-messages on completion.
Fixes #1
This commit is contained in:
parent
4e25d9e6c4
commit
fdfd61d121
3 changed files with 8 additions and 9 deletions
|
|
@ -7,7 +7,7 @@
|
|||
.Sh SYNOPSIS
|
||||
.Nm netbsd_exporter
|
||||
.Op Fl Fl no-http-header
|
||||
.Op Fl Fl syslog
|
||||
.Op Fl Fl no-syslog
|
||||
.Op Fl Fl version
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
|
|
@ -28,10 +28,9 @@ The following options are available:
|
|||
.Bl -tag -width indent
|
||||
.It Fl Fl no-http-header
|
||||
Disable HTTP header in output
|
||||
.It Fl Fl syslog
|
||||
Send diagnostic output and error messages to
|
||||
.Xr syslogd 8
|
||||
instead of stderr.
|
||||
.It Fl Fl no-syslog
|
||||
Send diagnostic output and error messages to stderr instead of
|
||||
.Xr syslogd 8 .
|
||||
.It Fl Fl version
|
||||
Print the version information
|
||||
.El
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ void print_help() {
|
|||
printf("Options:\n");
|
||||
printf(" --help Display this help message\n");
|
||||
printf(" --no-http-header Disable HTTP headers\n");
|
||||
printf(" --syslog Enable logging messages using syslog\n");
|
||||
printf(" --no-syslog Disable logging messages using syslog\n");
|
||||
printf(" --version Print the version information\n");
|
||||
}
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ int main(int argc, char *argv[]) {
|
|||
struct option long_options[] = {
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"no-http-header", no_argument, NULL, 1},
|
||||
{"syslog", no_argument, NULL, 2},
|
||||
{"no-syslog", no_argument, NULL, 2},
|
||||
{"version", no_argument, NULL, 3},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
|
@ -239,7 +239,7 @@ int main(int argc, char *argv[]) {
|
|||
option_http_header = 0;
|
||||
break;
|
||||
case 2:
|
||||
option_syslog = 1;
|
||||
option_syslog = 0;
|
||||
break;
|
||||
case 3:
|
||||
print_version();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
const char *program_name = "netbsd_exporter";
|
||||
|
||||
int option_http_header = 1;
|
||||
int option_syslog = 0;
|
||||
int option_syslog = 1;
|
||||
|
||||
void print_filesystem_metric(const char*, const char*, const char*, long );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue