Uses 1319K of libraries. Click here for Pure Java version (7923L/42K).
!7 cmodule PossibleLogFiles > DynObjectTable<File> { bool showTimestamps, enabled; start { dontPersist(); itemToMap = func(File f) -> Map { long time = f.lastModified(); ret litorderedmap( "Log File" := dropPrefix(addSlash(f2s(javaxDataDir())), f.getPath()), "Program" := unnull(snippetTitle_cached(firstSnippetIDFromPath(f))), "Size" := toK(fileSize(f)) + " K", "Changed" := /*howManySecondsAgo(time) + " (" +*/ renderHowLongAgo(time) /* + ")"*/, "Last Line" := showTimestamps ? shorten(lastLineOfFile(f), 150) : simplifyLogLineForDisplay(lastLineOfFile(f))); }; if (!enabled) ret; doEvery(dm_osBooting() ? 30.0 : 0.0, 60.0, r fullUpdate); doEvery(3.0, r updateTable); } afterVisualize { pcall { addRowSorter_desc(table, 3); rowSorter_setComparators(table, 2, alphaNumComparator(), 3, howLongAgo_comparator()); }} void fullUpdate() { setData(findProbableQuotedLogs()); } enhanceFrame { dm_boolFieldMenuItem(f, 'showTimestamps); } }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1019444 |
Snippet name: | Possible Log Files |
Eternal ID of this version: | #1019444/51 |
Text MD5: | 1e192eb9e95c99bb400f8928cb0f85ac |
Transpilation MD5: | 2de4061240e6d67e8f7dd58a872d2e65 |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-26 19:54:41 |
Source code size: | 1102 bytes / 34 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 566 / 1608 |
Version history: | 50 change(s) |
Referenced in: | [show references] |