Configure retroarch.cfg for output log to file

A have android tv box (K1 PLUS S2 T2).

How to configure retroarch.cfg for output log to file?

There’s no way to configure it to do that. On Android, you just have to use a logcat program to see the events as they occur.