Uses 911K of libraries. Click here for Pure Java version (5646L/26K).
1 | !7 |
2 | |
3 | // Note: Modules to be snooped on must have been retranspiled |
4 | // after Sep 2020 so they send "printed" VM bus messages |
5 | cmodule PrintSnooper > DynPrintLog {
|
6 | switchable bool enabled; |
7 | switchable S filter = ""; // regular expression |
8 | |
9 | start {
|
10 | dm_vmBus_onMessage printed(voidfunc(O where, S text) {
|
11 | if (!enabled) ret; |
12 | switch to q(); |
13 | if (!regexpFindIC(filter, text)) ret; |
14 | print(localTimeWithSeconds() + " " + shorten(escapeNewLines(text), 200)); |
15 | }); |
16 | } |
17 | |
18 | visual centerAndSouthWithMargins(super, |
19 | centerAndEastWithMargin(dm_fieldWithLabel filter(), |
20 | dm_fieldCheckBox enabled())); |
21 | } |
Began life as a copy of #1019633
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1029816 |
| Snippet name: | Print Snooper [filter stuff printed by other modules] |
| Eternal ID of this version: | #1029816/2 |
| Text MD5: | 6766bdc06c59e02878ae00fcef6812c7 |
| Transpilation MD5: | dd6a8a211f80e1c3d82fa8c0c1cc60e7 |
| 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-09-23 10:33:59 |
| Source code size: | 649 bytes / 21 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 497 / 5350 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |