From 1a278f9066534169dbf4074ab14cb45408c3ea41 Mon Sep 17 00:00:00 2001 From: Ivan Kozlovic Date: Mon, 10 Oct 2022 11:21:22 -0600 Subject: [PATCH] Adjust "nats-server -h" output Related to PR #3527 Signed-off-by: Ivan Kozlovic --- main.go | 94 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 45 deletions(-) diff --git a/main.go b/main.go index 0ce8f541..ac946ae5 100644 --- a/main.go +++ b/main.go @@ -28,61 +28,65 @@ var usageStr = ` Usage: nats-server [options] Server Options: - -a, --addr, --net Bind to host address (default: 0.0.0.0) - -p, --port Use port for clients (default: 4222) - -n, --name, --server_name Server name (default: auto) - -P, --pid File to store PID - -m, --http_port Use port for http monitoring - -ms,--https_port Use port for https monitoring - -c, --config Configuration file - -t Test configuration and exit - -sl,--signal [=] Send signal to nats-server process (stop, quit, reopen, reload) - can be either a PID (e.g. 1) or the path to a PID file (e.g. /var/run/nats-server.pid) - --client_advertise Client URL to advertise to other servers - --ports_file_dir Creates a ports file in the specified directory (_.ports). + -a, --addr, --net Bind to host address (default: 0.0.0.0) + -p, --port Use port for clients (default: 4222) + -n, --name + --server_name Server name (default: auto) + -P, --pid File to store PID + -m, --http_port Use port for http monitoring + -ms,--https_port Use port for https monitoring + -c, --config Configuration file + -t Test configuration and exit + -sl,--signal [=] Send signal to nats-server process (stop, quit, reopen, reload) + pid> can be either a PID (e.g. 1) or the path to a PID file (e.g. /var/run/nats-server.pid) + --client_advertise Client URL to advertise to other servers + --ports_file_dir Creates a ports file in the specified directory (_.ports). Logging Options: - -l, --log File to redirect log output - -T, --logtime Timestamp log entries (default: true) - -s, --syslog Log to syslog or windows event log - -r, --remote_syslog Syslog server addr (udp://localhost:514) - -D, --debug Enable debugging output - -V, --trace Trace the raw protocol - -VV Verbose trace (traces system account as well) - -DV Debug and trace - -DVV Debug and verbose trace (traces system account as well) - --log_size_limit Logfile size limit (default: auto) - --max_traced_msg_len Maximum printable length for traced messages (default: unlimited) + -l, --log File to redirect log output + -T, --logtime Timestamp log entries (default: true) + -s, --syslog Log to syslog or windows event log + -r, --remote_syslog Syslog server addr (udp://localhost:514) + -D, --debug Enable debugging output + -V, --trace Trace the raw protocol + -VV Verbose trace (traces system account as well) + -DV Debug and trace + -DVV Debug and verbose trace (traces system account as well) + --log_size_limit Logfile size limit (default: auto) + --max_traced_msg_len Maximum printable length for traced messages (default: unlimited) + JetStream Options: - -js, --jetstream Enable JetStream functionality. - -sd, --store_dir Set the storage directory. + -js, --jetstream Enable JetStream functionality + -sd, --store_dir Set the storage directory Authorization Options: - --user User required for connections - --pass Password required for connections - --auth Authorization token required for connections + --user User required for connections + --pass Password required for connections + --auth Authorization token required for connections TLS Options: - --tls Enable TLS, do not verify clients (default: false) - --tlscert Server certificate file - --tlskey Private key for server certificate - --tlsverify Enable TLS, verify client certificates - --tlscacert Client certificate CA for verification + --tls Enable TLS, do not verify clients (default: false) + --tlscert Server certificate file + --tlskey Private key for server certificate + --tlsverify Enable TLS, verify client certificates + --tlscacert Client certificate CA for verification Cluster Options: - --routes Routes to solicit and connect - --cluster Cluster URL for solicited routes - --cluster_name Cluster Name, if not set one will be dynamically generated - --no_advertise Do not advertise known cluster information to clients - --cluster_advertise Cluster URL to advertise to other servers - --connect_retries For implicit routes, number of connect retries - --cluster_listen Cluster url from which members can solicit routes. -Common Options: - -h, --help Show this message - -v, --version Show version - --help_tls TLS help + --routes Routes to solicit and connect + --cluster Cluster URL for solicited routes + --cluster_name Cluster Name, if not set one will be dynamically generated + --no_advertise Do not advertise known cluster information to clients + --cluster_advertise Cluster URL to advertise to other servers + --connect_retries For implicit routes, number of connect retries + --cluster_listen Cluster url from which members can solicit routes + Profiling Options: - --profile Profiling HTTP port. + --profile Profiling HTTP port + +Common Options: + -h, --help Show this message + -v, --version Show version + --help_tls TLS help ` // usage will print out the flag options for the server.