where does android debug put log file?

1,184 views
Skip to first unread message

Bob Gailer

unread,
Apr 20, 2017, 9:41:14 AM4/20/17
to Kivy users support
The log entries I see as a result of specifying RUN LOGCAT on the buildozer command line has these lines:

I/python  (19965): Run user program, change dir and execute main.py
I/python  (19965): [INFO              ] [Logger      ] Record log in /data/data/org.test.proj1/files/.kivy/logs/kivy_17-04-19_0.txt

Where is /data? I can't find it in the ubuntu computer nor in the phone SD card.

Alexander Taylor

unread,
Apr 20, 2017, 3:00:40 PM4/20/17
to Kivy users support
That directory is the app's own install directory, which is not generally accessible to other applications. I'm not sure what's written there anyway, if anything.

The normal way to access the log is via adb logcat: https://kivy.org/docs/guide/android.html#debugging-your-application-on-the-android-platform

ZenCODE

unread,
Apr 20, 2017, 5:09:01 PM4/20/17
to kivy-...@googlegroups.com
We find it useful to re-direct the logging to the user folder, so you can use a file explorer on the device to access it. Something like this (making sure this code runs before any other kivy imports...

```
from kivy.config import Config
from helpers.localos import get_user_path  # Basically expandpath('~') + ".<appnam>"
from os.path import join, exists
from os import makedirs

""" Sets the path to the log file. """
log_path = join(get_user_path(), 'logs')
if not exists(log_path):
    makedirs(log_path)
Config.set('kivy', 'log_dir', log_path)
```
Reply all
Reply to author
Forward
0 new messages