Skip to content

Commit 6d5e4ca

Browse files
committed
+Update dependencies
1 parent 59230ce commit 6d5e4ca

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

example/example.png

-56.1 KB
Loading

lib/src/log.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
99
//title~
1010

11+
import 'dart:math';
12+
1113
import 'package:df_safer_dart/df_safer_dart.dart' show Here;
1214
import 'package:meta/meta.dart' show visibleForTesting;
1315
import 'dart:developer' as developer;
@@ -522,7 +524,8 @@ final class Log {
522524
// Maybe get the basepath.
523525
String? location;
524526
if (includePath) {
525-
location = _shortenedLocation(Here(initialStackLevel).location.orNull());
527+
final frame = Here(max(0, initialStackLevel - 1)).call().orNull();
528+
location = _shortenedLocation(frame?.location, frame?.member);
526529
}
527530

528531
// Combine tags with the tag from category.
@@ -578,7 +581,7 @@ typedef Glog = Log;
578581

579582
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
580583

581-
String? _shortenedLocation(String? location) {
584+
String? _shortenedLocation(String? location, String? member) {
582585
if (location == null) {
583586
return null;
584587
}
@@ -590,7 +593,7 @@ String? _shortenedLocation(String? location) {
590593
final package = path.split(':')[1].split('/').first;
591594
return '$package:$file #$line';
592595
} else {
593-
return '$file #$line';
596+
return '$file/$member #$line';
594597
}
595598
}
596599
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

pubspec.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repository: https://github.com/robmllze/df_log
1616
funding:
1717
- https://www.buymeacoffee.com/dev_cetera
1818
description: A package that provides logging utilities for better debugging.
19-
version: 0.3.18
19+
version: 0.3.19
2020
topics:
2121
- console
2222
- debugging
@@ -33,12 +33,14 @@ environment:
3333

3434
dependencies:
3535
path: ^1.9.1
36-
df_safer_dart: ^0.15.2
36+
df_safer_dart: ^0.16.2
3737
uuid: ^4.5.1
3838
meta: ^1.16.0
3939

4040
## -----------------------------------------------------------------------------
4141

4242
dev_dependencies:
4343
lints: ^6.0.0
44+
custom_lint: ^0.7.5
45+
df_safer_dart_lints: ^0.3.2
4446

0 commit comments

Comments
 (0)