From ac245f4f11983cac2b7bc87103c9a97a0f3ee6fe Mon Sep 17 00:00:00 2001 From: antcybersec Date: Wed, 17 Jun 2026 19:36:06 +0530 Subject: [PATCH] Document fabric-ca-client -d debug flag (#426) Unhide the -d/--debug flag so it appears in CLI help, matching the server. Document the flag in clientcli.rst and explain that -d must not be combined with --loglevel in the user's guide. Signed-off-by: antcybersec --- docs/source/clientcli.rst | 1 + docs/source/users-guide.rst | 7 +++++++ lib/clientconfig.go | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/source/clientcli.rst b/docs/source/clientcli.rst index a238b999d..95cd9f436 100644 --- a/docs/source/clientcli.rst +++ b/docs/source/clientcli.rst @@ -47,6 +47,7 @@ Fabric-CA Client's CLI --id.type string Type of identity being registered (e.g. 'peer, app, user') (default "client") --idemix.curve string The identity mixer curve ID to use among {'amcl.Fp256bn', 'gurvy.Bn254', 'amcl.Fp256Miraclbn'} (default "amcl.Fp256bn") --loglevel string Set logging level (info, warning, debug, error, fatal, critical) + -d, --debug Enable debug level logging -M, --mspdir string Membership Service Provider directory (default "msp") --mycacertfile string [Optional]: Path within the MSP directory where the root CA certificate is written --mycertfile string [Optional]: Path within the MSP directory where the enrollment certificate is written diff --git a/docs/source/users-guide.rst b/docs/source/users-guide.rst index 4bf2f03c1..5bf53554d 100644 --- a/docs/source/users-guide.rst +++ b/docs/source/users-guide.rst @@ -245,6 +245,13 @@ for convenience. Additional usage information is provided in following sections The following links shows the :doc:`Server Command Line ` and :doc:`Client Command Line `. +Both the Fabric CA server and client support ``-d``/``--debug`` to enable debug +level logging. The client also supports ``--loglevel`` to set a specific log +level. Do not use ``-d`` together with ``--loglevel`` on the same command; if +both are specified, the command fails. To reduce verbosity, omit ``-d`` from +example commands and use ``--loglevel`` instead (for example, +``--loglevel warning``). + .. note:: Note that command line options that are string slices (lists) can be specified either by specifying the option with comma-separated list elements or by specifying the option multiple times, each with a diff --git a/lib/clientconfig.go b/lib/clientconfig.go index 4a6718aaa..3b41ffe1c 100644 --- a/lib/clientconfig.go +++ b/lib/clientconfig.go @@ -41,7 +41,7 @@ type ClientConfig struct { CAInfo api.GetCAInfoRequest CAName string `help:"Name of CA"` CSP *factory.FactoryOpts `mapstructure:"bccsp" hide:"true"` - Debug bool `opt:"d" help:"Enable debug level logging" hide:"true"` + Debug bool `opt:"d" help:"Enable debug level logging"` LogLevel string `help:"Set logging level (info, warning, debug, error, fatal, critical)"` Idemix api.Idemix MySkFile string `help:"[Optional]: Path within the MSP directory where the private key is written"`