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

Michael Balzer dexter at expeedo.de
Wed Jan 10 07:20:16 HKT 2018


Mark,

I've built a simple "tail" command to follow the file log on the telnet console.

Unfortunately -- with v2.1 -- the fflush() on the log file doesn't work as expected, the file contents will not be updated until I close the file.

Is that issue solved with v3.x?

Regards,
Michael


Am 08.01.2018 um 07:28 schrieb Mark Webb-Johnson:
> 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 <mailto: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
>
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

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


More information about the OvmsDev mailing list