Data logging and Log File Access

Data logging can be started either manually or left to run automatically. Data logging is off by default but you can enable it by changing the “enabled” setting to 1 in the [datalogs] section of the sdc.ini file. When dataloggging is enabled, by default the system keeps the last 10 datalogs on the disk, regardless of their size. Every time SDC boots up it deletes the oldest log files until there are only 10 left. This setting can also be changed. See the datalogs ini file section for further details.

If you plan to enable datalogging, then you should also implement controlled shutdown so that the datalogs can be closed before the power is removed from the device.

I do not recommend using an SD Card extension cable to make the SD card accessible outside of the Pi. There are many reports of these cables causing unreliability because the electrical signals between the card and the Pi are degraded by the un-shielded cable. You should only use the card plugged directly into the Pi. This is primarily why it is a good idea to enable WIFI access if you have a Pi that supports it.

Datalog Configuration

The content of the datalog can be changed by altering the DataLog Settings

Accessing the Datalogs

Datalogs can be accessed in one of two ways:

  • You can remove the SD card from the device and plug it into your PC. If your Pi is embedded somewhere behind your dash then this obviously isn’t going to work, so you’re going to need the second option.
  • You can configure WIFI on the device, and then access the logs remotely.

Accessing log files directly from the SD Card

  • Plug the SD card into your PC’s card reader
  • Access the root of the drive
  • You will find a folder in the root called datalogs
  • Inside this folder is a set of files, each one starting with ‘dl’ and followed by a number.
  • Log files with the largest number are most recent

You can simply copy any log files you want to view onto your local hard disk and then use MegaLogViewer to open them.

Accessing log files via WIFI

  • Configure WIFI access and reboot the device
  • Find out what the IP address of the device is, either by looking at your router or using the SDC Tools Application.
  • Open a browser and access the following URL: http://<ip address>/datalogs
  • You should see a display similar to the image below. To download a log file, click on it.

You can download the currently active datalog but there may be an incomplete line at the end of it.