{"meta":{"title":"generate log-summary","intro":"[Advanced] Create a summary of a structured log file.","product":"Security and code quality","breadcrumbs":[{"href":"/en/code-security","title":"Security and code quality"},{"href":"/en/code-security/reference","title":"Reference"},{"href":"/en/code-security/reference/code-scanning","title":"Code scanning"},{"href":"/en/code-security/reference/code-scanning/codeql","title":"CodeQL"},{"href":"/en/code-security/reference/code-scanning/codeql/codeql-cli-manual","title":"CodeQL CLI manual"},{"href":"/en/code-security/reference/code-scanning/codeql/codeql-cli-manual/generate-log-summary","title":"generate log-summary"}],"documentType":"article"},"body":"# generate log-summary\n\n[Advanced] Create a summary of a structured log file.\n\n> [!NOTE]\n> This content describes the most recent release of the CodeQL CLI. For more information about this release, see https://github.com/github/codeql-cli-binaries/releases.\n>\n> To see details of the options available for this command in an earlier release, run the command with the <span style=\"white-space: nowrap;\">`--help`</span> option in your terminal.\n\n## Synopsis\n\n```shell copy\ncodeql generate log-summary <options>... -- <input> <result>\n```\n\n## Description\n\n\\[Advanced] Create a summary of a structured log file.\n\nThis command creates a summary of a structured JSON evaluator event log.\nThe output of this command aims to be more stable across different\nversions of the CLI than the log files themselves. Thus, when\nimplementing a script that uses output from the logs, it is strongly\nrecommended to run this command and use its output rather than using the\nevent logs directly.\n\n## Options\n\n### Primary Options\n\n#### `<input>`\n\n\\[Mandatory] Path to the event log file to produce a summary of.\n\n#### `<result>`\n\nPath to the location to output the summarised log file to. If this\nomitted, then the summary will be output to stdout.\n\n#### `--minify-output`\n\nWhere applicable, omit whitespace in the outputted summary. The result\nwill be less human-readable but take up less memory. This option only\nhas an effect for some output formats.\n\n#### `--utc`\n\n\\[Advanced] Certain timestamps in the summaries produced by this\ncommand may use the local timezone of the machine they are running on.\nEnabling this flag forces all timestamps to be UTC.\n\n#### `--format=<format>`\n\nControl the format of the output produced.\n\n`predicates` _(default)_: Produce a summary of the computation performed\nfor each predicate. This will be a stream of JSON objects separated\neither by two newline characters (by default) or one if the\n`--minify-output` option is passed.\n\n`text`: Produce a human-readable summary of the evaluation run.\n\n`overall`: Produce a JSON file containing some overall information about\nthe evaluation run, including some summary statistics and information\nabout the most time-consuming evaluations that were performed.\n\n#### `--[no-]deduplicate-stage-summaries`\n\n\\[Advanced] This option only works in conjunction with the text format.\nIf passed, this will result in the summary tables containing the most\nexpensive predicates not being repeated for stages that are shared\nbetween queries. This has the side-effect of moving all the summary\ntables to the end of the log, rather than having the ones for each query\nappear at the point when that query finished.\n\n### Common options\n\n#### `-h, --help`\n\nShow this help text.\n\n#### `-J=<opt>`\n\n\\[Advanced] Give option to the JVM running the command.\n\n(Beware that options containing spaces will not be handled correctly.)\n\n#### `-v, --verbose`\n\nIncrementally increase the number of progress messages printed.\n\n#### `-q, --quiet`\n\nIncrementally decrease the number of progress messages printed.\n\n#### `--verbosity=<level>`\n\n\\[Advanced] Explicitly set the verbosity level to one of errors,\nwarnings, progress, progress+, progress++, progress+++. Overrides `-v`\nand `-q`.\n\n#### `--logdir=<dir>`\n\n\\[Advanced] Write detailed logs to one or more files in the given\ndirectory, with generated names that include timestamps and the name of\nthe running subcommand.\n\n(To write a log file with a name you have full control over, instead\ngive `--log-to-stderr` and redirect stderr as desired.)\n\n#### `--common-caches=<dir>`\n\n\\[Advanced] Controls the location of cached data on disk that will\npersist between several runs of the CLI, such as downloaded QL packs and\ncompiled query plans. If not set explicitly, this defaults to a\ndirectory named `.codeql` in the user's home directory; it will be\ncreated if it doesn't already exist.\n\nAvailable since `v2.15.2`."}