# Control console output and logs

DocInsight separates human-readable terminal output from diagnostic log files. Adjust terminal output for interactive or automated use, and create a log file when investigating a failure or preparing a support request.

## Choose terminal verbosity

By default, commands show normal progress, warnings, and errors. Use `--quiet` when only warnings and errors should be printed:

shell

    docinsight check --quiet

Use `-v` to print more detail. Repeat it for more verbose output:

shell

    docinsight build -v
    docinsight build -vv

## Control terminal presentation

DocInsight normally selects color behavior for the current terminal. Use `--color` to choose `auto`, `always`, or `never`, or use `--no-color` as a shortcut for disabling color:

shell

    docinsight check --color always
    docinsight check --no-color

Progress indicators and file hyperlinks also default to `auto`. Override automatic detection when a terminal or log consumer needs deterministic output:

shell

    docinsight build --progress never --hyperlinks never

`--no-progress` and `--no-hyperlinks` are shortcuts for disabling these features.

## Write a log file

Use `--log-file` to append diagnostic logs to a file. DocInsight creates missing parent directories:

shell

    docinsight build --log-file logs/docinsight.log

Set `--log-level` to control the minimum diagnostic logging level:

shell

    docinsight build --log-file logs/docinsight.log --log-level debug

When you pass `--log-level`, DocInsight also writes diagnostic log events at that level to stderr. The same level applies to `--log-file` when both options are present.

The same settings can be provided with environment variables. In PowerShell:

powershell

    $env:DOCINSIGHT_LOG_FILE = "logs/docinsight.log"
    $env:DOCINSIGHT_LOG_LEVEL = "debug"
    docinsight build

Terminal verbosity and diagnostic logging are separate controls. `--quiet` suppresses normal progress and summaries, but it does not disable diagnostic logging requested with `--log-level`.

## Troubleshoot build failures

Build diagnostics can come from manifest resolution, content ingestion, source analysis, target generation, or an external tool. Run `check` first, then capture a detailed build log:

shell

    docinsight check --all-targets
    docinsight build --target site --log-file logs/docinsight-build.log --log-level debug

For CHM compiler failures, verify that Microsoft HTML Help Workshop is installed. If `hhc.exe` is in a nonstandard location, set `DOCINSIGHT_HHC_TOOL` to its full path.

For exact console and logging options, see the command pages in the generated CLI command reference.