> For the complete documentation index, see [llms.txt](https://raia-software-inc.gitbook.io/tacview-2-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raia-software-inc.gitbook.io/tacview-2-documentation/api-reference/api-reference/diagnostic-tools.md).

# Diagnostic Tools

Diagnostic tools help add-ons report what they are doing, what went wrong, and what may require attention.

The logging functions write messages to Tacview’s debug log. After formatting, each message is displayed in the debug log and saved to the log file on disk.

Good logs are useful long after the add-on has been written. They can help users understand what happened, help developers reproduce issues, and make support requests much easier to diagnose.

## Logging functions

Choose the appropriate function based on the importance of your message.

* [LogDebug()](/tacview-2-documentation/api-reference/api-reference/diagnostic-tools/log-debug.md) writes low-priority development messages.
* [LogInformation()](/tacview-2-documentation/api-reference/api-reference/diagnostic-tools/log-information.md) reports useful runtime information.
* [LogWarning()](/tacview-2-documentation/api-reference/api-reference/diagnostic-tools/log-warning.md) reports unusual situations that may require attention.
* [LogError()](/tacview-2-documentation/api-reference/api-reference/diagnostic-tools/log-error.md) reports critical issues that prevent the add-on from working as expected.

## Guidelines

Keep log output focused and relevant. A clear message at the right level is more useful than many noisy messages.

Use `LogDebug()` for internal development traces. These messages are hidden by default and should usually be disabled or removed before releasing your add-on.

Use `LogInformation()` for events that are useful to users or testers, such as successful initialization, imported data, or important configuration choices.

Use `LogWarning()` when something unusual happened, but the add-on can still continue.

Use `LogError()` when the add-on cannot complete an operation or cannot work correctly without user action.

When Tacview and your add-on are used correctly, the log should remain free of warnings and errors.
