{
    "content": [
        {
            "type": "text",
            "text": "# watchgnupg(1) (man)\n\n**Summary:** watchgnupg - Read and print logs from a socket\n\n**Synopsis:** watchgnupg [--force] [--verbose] socketname\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --force | — | Delete an already existing socket file. --tcp n Instead of reading from a local socket, listen for connects on TCP port  |\n| — | --time-only | — | Do not print the date part of the timestamp. |\n| — | --verbose | — | Enable extra informational output. |\n| — | --version | — | Print version of the program and exit. --help Display a brief help page and exit. |\n\n## Examples\n\n- `$ watchgnupg --force --time-only $(gpgconf --list-dirs socketdir)/S.log`\n- `This waits for connections on the local socket (e.g. ‘/home/foo/.gnupg/S.log’) and shows  all`\n- `log  entries.   To make this work the option log-file needs to be used with all modules which`\n- `logs are to be shown.  The suggested entry for the configuration files is:`\n- `log-file socket://`\n- `If the default socket as given above and returned  by  \"echo  $(gpgconf  --list-dirs  socket‐`\n- `dir)/S.log\"  is  not  desired  an  arbitrary  socket  name  can  be  specified,  for  example`\n- `‘socket:///home/foo/bar/mysocket’.  For debugging purposes it is also possible to  do  remote`\n- `logging.  Take care if you use this feature because the information is send in the clear over`\n- `the network.  Use this syntax in the conf files:`\n- `log-file tcp://192.168.1.1:4711`\n- `You may use any port and not just 4711 as shown above; only IP addresses  are  supported  (v4`\n- `and  v6) and no host names.  You need to start watchgnupg with the tcp option.  Note that un‐`\n- `der Windows the registry entry HKCU\\Software\\GNU\\GnuPG:DefaultLogFile can be used  to  change`\n- `the default log output from stderr to whatever is given by that entry.  However the only use‐`\n- `ful entry is a TCP name for remote debugging.`\n\n## See Also\n\n- gpg(1)\n- gpgsm(1)\n- gpg-agent(1)\n- scdaemon(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (12 lines)\n- **OPTIONS** (4 lines) — 4 subsections\n  - --force (8 lines)\n  - --time-only (3 lines)\n  - --verbose (3 lines)\n  - --version (6 lines)\n- **EXAMPLES** (24 lines)\n- **SEE ALSO** (20 lines)\n\n## Full Content\n\n### NAME\n\nwatchgnupg - Read and print logs from a socket\n\n### SYNOPSIS\n\nwatchgnupg [--force] [--verbose] socketname\n\n### DESCRIPTION\n\nMost  of the main utilities are able to write their log files to a Unix Domain socket if con‐\nfigured that way.  watchgnupg is a simple listener for such a  socket.   It  ameliorates  the\noutput  with a time stamp and makes sure that long lines are not interspersed with log output\nfrom other utilities.  This tool is not available for Windows.\n\n\n\nwatchgnupg is commonly invoked as\n\nwatchgnupg --force $(gpgconf --list-dirs socketdir)/S.log\n\n### OPTIONS\n\nwatchgnupg understands these options:\n\n#### --force\n\nDelete an already existing socket file.\n\n\n\n--tcp n\nInstead of reading from a local socket, listen for connects on TCP port n.\n\n#### --time-only\n\nDo not print the date part of the timestamp.\n\n#### --verbose\n\nEnable extra informational output.\n\n#### --version\n\nPrint version of the program and exit.\n\n\n--help Display a brief help page and exit.\n\n### EXAMPLES\n\n$ watchgnupg --force --time-only $(gpgconf --list-dirs socketdir)/S.log\n\nThis waits for connections on the local socket (e.g. ‘/home/foo/.gnupg/S.log’) and shows  all\nlog  entries.   To make this work the option log-file needs to be used with all modules which\nlogs are to be shown.  The suggested entry for the configuration files is:\n\nlog-file socket://\n\nIf the default socket as given above and returned  by  \"echo  $(gpgconf  --list-dirs  socket‐\ndir)/S.log\"  is  not  desired  an  arbitrary  socket  name  can  be  specified,  for  example\n‘socket:///home/foo/bar/mysocket’.  For debugging purposes it is also possible to  do  remote\nlogging.  Take care if you use this feature because the information is send in the clear over\nthe network.  Use this syntax in the conf files:\n\nlog-file tcp://192.168.1.1:4711\n\nYou may use any port and not just 4711 as shown above; only IP addresses  are  supported  (v4\nand  v6) and no host names.  You need to start watchgnupg with the tcp option.  Note that un‐\nder Windows the registry entry HKCU\\Software\\GNU\\GnuPG:DefaultLogFile can be used  to  change\nthe default log output from stderr to whatever is given by that entry.  However the only use‐\nful entry is a TCP name for remote debugging.\n\n### SEE ALSO\n\ngpg(1), gpgsm(1), gpg-agent(1), scdaemon(1)\n\nThe full documentation for this tool is maintained as a Texinfo manual.   If  GnuPG  and  the\ninfo program are properly installed at your site, the command\n\ninfo gnupg\n\nshould give you access to the complete manual including a menu structure and an index.\n\n\n\n\n\n\n\n\n\n\n\nGnuPG 2.2.27                                 2020-12-21                                WATCHGNUPG(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "watchgnupg",
        "section": "1",
        "mode": "man",
        "summary": "watchgnupg - Read and print logs from a socket",
        "synopsis": "watchgnupg [--force] [--verbose] socketname",
        "flags": [
            {
                "flag": "",
                "long": "--force",
                "arg": null,
                "description": "Delete an already existing socket file. --tcp n Instead of reading from a local socket, listen for connects on TCP port n."
            },
            {
                "flag": "",
                "long": "--time-only",
                "arg": null,
                "description": "Do not print the date part of the timestamp."
            },
            {
                "flag": "",
                "long": "--verbose",
                "arg": null,
                "description": "Enable extra informational output."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Print version of the program and exit. --help Display a brief help page and exit."
            }
        ],
        "examples": [
            "$ watchgnupg --force --time-only $(gpgconf --list-dirs socketdir)/S.log",
            "This waits for connections on the local socket (e.g. ‘/home/foo/.gnupg/S.log’) and shows  all",
            "log  entries.   To make this work the option log-file needs to be used with all modules which",
            "logs are to be shown.  The suggested entry for the configuration files is:",
            "log-file socket://",
            "If the default socket as given above and returned  by  \"echo  $(gpgconf  --list-dirs  socket‐",
            "dir)/S.log\"  is  not  desired  an  arbitrary  socket  name  can  be  specified,  for  example",
            "‘socket:///home/foo/bar/mysocket’.  For debugging purposes it is also possible to  do  remote",
            "logging.  Take care if you use this feature because the information is send in the clear over",
            "the network.  Use this syntax in the conf files:",
            "log-file tcp://192.168.1.1:4711",
            "You may use any port and not just 4711 as shown above; only IP addresses  are  supported  (v4",
            "and  v6) and no host names.  You need to start watchgnupg with the tcp option.  Note that un‐",
            "der Windows the registry entry HKCU\\Software\\GNU\\GnuPG:DefaultLogFile can be used  to  change",
            "the default log output from stderr to whatever is given by that entry.  However the only use‐",
            "ful entry is a TCP name for remote debugging."
        ],
        "see_also": [
            {
                "name": "gpg",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gpg/1/json"
            },
            {
                "name": "gpgsm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gpgsm/1/json"
            },
            {
                "name": "gpg-agent",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gpg-agent/1/json"
            },
            {
                "name": "scdaemon",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/scdaemon/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 4,
                "subsections": [
                    {
                        "name": "--force",
                        "lines": 8,
                        "long": "--force"
                    },
                    {
                        "name": "--time-only",
                        "lines": 3,
                        "long": "--time-only"
                    },
                    {
                        "name": "--verbose",
                        "lines": 3,
                        "long": "--verbose"
                    },
                    {
                        "name": "--version",
                        "lines": 6,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 20,
                "subsections": []
            }
        ]
    }
}