> For the complete documentation index, see [llms.txt](https://docs.intrepidcs.com/vspy-3-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intrepidcs.com/vspy-3-documentation/3.9.15/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-log-data.md).

# Script Type Function Block Command: Log Data

### Command Description

This command allows data to be logged to a file or device from within a function block script.

### Value Field Parameters

Double-click in the **Value** field to launch the dialog box where data logging settings can be entered (Figure 1).

![Figure 1: Parameter setup for the Load Message Datacommand.](https://2396693198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlRJv2XDCMeZSU0VbeZlG%2Fuploads%2Fgit-blob-1dde7641ecb8f8aa1999f3b31b46ce12cf716d3b%2Ffb_log_data.gif?alt=media)

### Insert Date/Time at start of line

When checked, prepends the logged data with a timestamp.

### Text To Log

The text to be logged, which is specified as an expression using the [Expression Builder](/vspy-3-documentation/3.9.15/shared-features-in-vehicle-spy/shared-features-expression-builder.md). Examples include a static text string entered as an expression (with **Evaluate as text** checked in the Expression Builder) or a string from a signal.

### Log Type

The type of log to create:

* **Text File:** A plain text file.
* **HTML File:** A file encoded using standard HTML.
* **neoECU RS232 Port**
* **neoECU LCD**
* **neoECU Network**
* **Host PC**
* **neoVI MOTE Screen**

### Use File Name / Dynamic File name

Choose one of these radio buttons to determine where the file's name comes from:

* **Use File Name:** Enter a static filename in the adjacent box.
* **Dynamic File Name:** Select an [application signal](/vspy-3-documentation/3.9.15/vehicle-spy-main-menus/main-menu-scripting-and-automation/application-signals.md) in the setup that contains the name of the file. This allows you to change the name of the file on the fly by using [Set Value](/vspy-3-documentation/3.9.15/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-set-value.md) or other commands to adjust the name stored in that application signal.

### Overwrite File if it exists

When selected, existing files are overwritten rather than creating new ones, to prevent filling the data directory with many log files.

### Make logged data persistent

When selected, written data persists in storage.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.intrepidcs.com/vspy-3-documentation/3.9.15/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-log-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
