# Datalogger

Log data to a log file in device storage.

## ~ hint

A data file is created in device storage on the @boardname@. The file is formatted as text rows of comma separated vales (CSV). Each row contains the named data values added to it and the sample time (write time) of the row.

## ~

```cards
datalogger.addRow()
datalogger.addValue("x", 0)
datalogger.setEnabled(false)
datalogger.setSampleInterval(50)
datalogger.sendToConsole(false)
datalogger.setSeparator(LogSeparator.Tab)
```

## See also

[add row](/reference/datalogger/add-row),
[add value](/reference/datalogger/add-value),
[set enabled](/reference/datalogger/set-enabled),
[set sample interval](/reference/datalogger/set-sample-interval),
[send to console](/reference/datalogger/send-to-console),
[set separator](/reference/datalogger/set-separator)

```package
datalogger
```