darshanparajuli / LogcatReader

A simple app for viewing logs on an android device.
MIT License
580 stars 103 forks source link

Use more logical date which works when sorting for saved log files #78

Open rugk opened 3 months ago

rugk commented 3 months ago

Problem

I have a lot of logs saved, so they e.g. take more than one screen. So when I need to find a log (because I e.g. did not use the direct share action when it was created or if that failed) I have to search it. This currently is hard as the log is named logcat_MM-DD-YYYY_HH-MM-SS.txt and sorted by this, which sorts it quite random as you can see on the screenshot. I e.g. could like to rename the log and find it for that reason.

Screenshot_20240528-093640_1_1_1

Solution

Name it "properly" like: logcat_YYYY-MM-DD_HH-MM-SS.txt, which automatically sorts correctly.

After all, this is also the only way to "properly" format dates 😉

See https://xkcd.com/1179/ https://www.explainxkcd.com/wiki/index.php/1179:_ISO_8601