Logging to file

To find some bugs, I need logs from tester’s devices. Is it possible to redirect the whole log of the engine to a file? (Android devices).

Also, how to enable logs in release mode (Android, Cocos Creator 1.7)?