Log files not generated #406

Closed
by 6arms1leg opened 5 years ago · 7 comments
6arms1leg commented 5 years ago (Migrated from github.com)
Owner

I tried to collect some log data on the (failing) connection process for my new Mi Band 2 with Gadgetbridge. I checked "Write Log Files" under "Developer options" on the "Settings" screen, but can't find the log files anywhere on my device.
The Wiki states that Gadgedbridge's log files could be found at /sdcard/Android/data/nodomain.freeyourgadget.gadgetbridge/files/gadgetbridge.log, but I can't find it on that path -- neither on my internal or external storage.
A restart of the App also didn't help.

I have the latest Gadgedbridge version (0.13.3) installed on my HTC One M8 with CM 12.1.

I tried to collect some log data on the (failing) connection process for my new Mi Band 2 with Gadgetbridge. I checked "Write Log Files" under "Developer options" on the "Settings" screen, but can't find the log files anywhere on my device. The [Wiki states](https://github.com/Freeyourgadget/Gadgetbridge/wiki/Log-Files) that Gadgedbridge's log files could be found at `/sdcard/Android/data/nodomain.freeyourgadget.gadgetbridge/files/gadgetbridge.log`, but I can't find it on that path -- neither on my internal or external storage. A restart of the App also didn't help. I have the latest Gadgedbridge version (0.13.3) installed on my HTC One M8 with CM 12.1.
Owner

Noooo, not again!! Can you try to get some normal logcat output, either with adb from the PC or with a logcat app on your device? If anything's wrong, it should at least write something to the normal logcat.

Noooo, not again!! Can you try to get some normal logcat output, either with adb from the PC or with a logcat app on your device? If anything's wrong, it should at least write something to the normal logcat.
6arms1leg commented 5 years ago (Migrated from github.com)
Poster
Owner

Sure I can get some logcat output.
What action exactly do you want me to log?
For now, I attached one logcat log file to my last post on #323.
If you need more, please let me know.

Sure I can get some logcat output. What action exactly do you want me to log? For now, I attached one logcat log file to my last post on #323. If you need more, please let me know.
Owner

Ideally one where you start up Gadgetbridge or enable logging.

Ideally one where you start up Gadgetbridge or enable logging.
6arms1leg commented 5 years ago (Migrated from github.com)
Poster
Owner

Attached (see end of this post) is a logcat log of starting Gadgedbridge and enabling logging ("Write Log Files").
Strange, seems like Gadgedbridge can't write to my external SD card...

10-10 19:21:08.652 I/nodomain.freeyourgadget.gadgetbridge.util.GB( 5773): ignoring non-writable external storage dir: /storage/sdcard1/Android/data/nodomain.freeyourgadget.gadgetbridge/files
10-10 19:21:08.654 I/System.out( 5773): 19:21:08,654 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: GB_LOGFILES_DIR_IS_UNDEFINED/gadgetbridge.log
10-10 19:21:08.655 I/System.out( 5773): 19:21:08,655 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [/data/data/nodomain.freeyourgadget.gadgetbridge/files/GB_LOGFILES_DIR_IS_UNDEFINED/gadgetbridge.log]

Why isn't it using the internal storage anyway (not all devices have external SD cards)?
File creation on the internal storage doesn't seem to cause any problems though, as Gadgedbridge can create a database backup file there.

logcat-start_gb_enable_logging.log.zip

Attached (see end of this post) is a logcat log of starting Gadgedbridge and enabling logging ("Write Log Files"). Strange, seems like Gadgedbridge can't write to my external SD card... ``` 10-10 19:21:08.652 I/nodomain.freeyourgadget.gadgetbridge.util.GB( 5773): ignoring non-writable external storage dir: /storage/sdcard1/Android/data/nodomain.freeyourgadget.gadgetbridge/files 10-10 19:21:08.654 I/System.out( 5773): 19:21:08,654 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: GB_LOGFILES_DIR_IS_UNDEFINED/gadgetbridge.log 10-10 19:21:08.655 I/System.out( 5773): 19:21:08,655 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [/data/data/nodomain.freeyourgadget.gadgetbridge/files/GB_LOGFILES_DIR_IS_UNDEFINED/gadgetbridge.log] ``` Why isn't it using the internal storage anyway (not all devices have external SD cards)? File creation on the internal storage doesn't seem to cause any problems though, as Gadgedbridge can create a database backup file there. [logcat-start_gb_enable_logging.log.zip](https://github.com/Freeyourgadget/Gadgetbridge/files/520130/logcat-start_gb_enable_logging.log.zip)
Owner

We try really hard to find the best writable storage directory, that is accessible by the user (who is often not root). I changed on thing which hopefully resolves the issue for you.

We try really hard to find the best writable storage directory, that is accessible by the user (who is often not root). I changed on thing which hopefully resolves the issue for you.
6arms1leg commented 5 years ago (Migrated from github.com)
Poster
Owner

With the new version of Gadgetbridge, the issue is gone and log files are created on my internal storage as described in the wiki.
Many thanks! 👍

With the new version of Gadgetbridge, the issue is gone and log files are created on my internal storage as described in the wiki. Many thanks! :+1:
Owner

Thanks for verifying the fix!

Thanks for verifying the fix!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.