File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -582,13 +582,17 @@ String? _shortenedLocation(String? location) {
582582 if (location == null ) {
583583 return null ;
584584 }
585- // Remove 'package:' prefix
586- var cleaned = location.replaceFirst (RegExp (r'^package:[^\/]+\/' ), '' );
587- // Remove column number (e.g., ':123' at the end)
588- cleaned = cleaned.replaceFirst (RegExp (r':\d+$' ), '' );
589- return cleaned.trim ();
585+ final parts = location.split (RegExp (r'\s+' ));
586+ final path = parts.first;
587+ final line = parts.last.split (':' ).first;
588+ final file = path.split ('/' ).last.replaceAll ('.dart' , '' );
589+ if (path.startsWith ('package:' )) {
590+ final package = path.split (':' )[1 ].split ('/' ).first;
591+ return '$package :$file #$line ' ;
592+ } else {
593+ return '$file #$line ' ;
594+ }
590595}
591-
592596// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
593597
594598enum _IconCategory {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ repository: https://github.com/robmllze/df_log
1616funding :
1717 - https://www.buymeacoffee.com/dev_cetera
1818description : A package that provides logging utilities for better debugging.
19- version : 0.3.15
19+ version : 0.3.16
2020topics :
2121 - console
2222 - debugging
You can’t perform that action at this time.
0 commit comments