User's Guide
Logging to SD CARD
You can also choose to store logs on SD CARD. This is very useful to capture debugging
information for the developers, as the log will show what happened before a crash or
misbehaviour.
We recommend creating a directory to store logs, i.e.:
OVMS# vfs mkdir /sd/logs
To enable logging to a file, issue for example:
OVMS# log file /sd/logs/20180420.log
The destination file can be changed any time. To disable logging to the file, issue “log file”
without a file name or “log close”. You may choose an arbitrary file name, good practice is using
some date and/or bug identification tag. Note: logging will append to the file if it already exists.
To remove a file, use “vfs rm …”. File logging does not persist over a reboot or crash, you can
use a script bound to the “sd.mounted” event to re-enable file logging automatically or configure
automatic logging.
You can use the webserver to view and download the files. The webserver default configuration
enables directory listings and access to files located under the document root directory, which is
“/sd” by default. Any path not bound to an internal webserver function is served from the
document root. So you can get an inventory of your log files now at the URL
http://192.168.4.1/logs/
…and access your log files from there or directly by their respective URLs.
OVMS v3 User Guide Page 29 / 86