Skip to content

Commit

Permalink
Show latest logfile at top
Browse files Browse the repository at this point in the history
  • Loading branch information
Xcreen committed Nov 12, 2024
1 parent 4fdccd3 commit 523493d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import java.io.LineNumberReader
import java.util.*

class LoggingFragment : Fragment() {
var dataModels = ArrayList<LoggingDataModel>()
private var dataModels = ArrayList<LoggingDataModel>()
private var customListViewAdapter: LoggingCustomListViewAdapter? = null

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
Expand All @@ -33,7 +33,7 @@ class LoggingFragment : Fragment() {
val logFiles = logDir.listFiles()
if (logFiles != null) {
//Add Log-files
for (logFile in logFiles) {
for (logFile in logFiles.reversed()) {
if (logFile.isFile) {
//Read Line-Count
val lineNumberReader = LineNumberReader(FileReader(logFile.absolutePath))
Expand Down

0 comments on commit 523493d

Please sign in to comment.