[Ovmsdev] Add support for "log file ..." to log to the specified vfs file

Mark Webb-Johnson mark at webb-johnson.net
Mon Jan 8 14:28:18 HKT 2018


I’ve restructured the log commands a bit:

The old "level <severity>” command has moved to "log level <severity>"

A new “log file <path>” command has been added. For example “log file /sd/log.txt” will mean that anything that gets logged to the console will also get appended to /sd/log.txt as well, until reboot. You can use /sd (if SD CARD is working for you), or /store (but take care - that is system flash).

You should be able to hook this in at the “sd.mounted” event script, to turn on logging to sd card on boot (again, if SD CARD is working for you).

Enjoy, Mark

>  Branch: refs/heads/master
>  Home:   https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3
>  Commit: 6947670e33823dd68d4bf76b7872518fc8398264
>      https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/6947670e33823dd68d4bf76b7872518fc8398264
>  Author: Mark Webb-Johnson <mark at webb-johnson.net>
>  Date:   2018-01-08 (Mon, 08 Jan 2018)
> 
>  Changed paths:
>    M vehicle/OVMS.V3/main/console_async.cpp
>    M vehicle/OVMS.V3/main/ovms_command.cpp
>    M vehicle/OVMS.V3/main/ovms_log.h
>    M vehicle/OVMS.V3/main/ovms_main.cpp
> 
>  Log Message:
>  -----------
>  Add support for "log file ..." to log to the specified vfs file

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180108/e3344b78/attachment.htm>


More information about the OvmsDev mailing list