Skip to content

Commit decf05a

Browse files
committed
update
1 parent 2d4ba25 commit decf05a

2 files changed

Lines changed: 17 additions & 14 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
---
1111

12+
<!-- BEGIN _README_CONTENT -->
13+
1214
`df_log` is a massive upgrade from `print()`. It makes your console output beautiful, readable, and powerful, turning your logs into a central event bus for debugging, analytics, and crash reporting. It’s for the developer who wants the simplicity of `print()` but with more clarity, context, and control.
1315

1416
## ✨ Features
@@ -210,6 +212,8 @@ void main() {
210212
}
211213
```
212214

215+
<!-- END _README_CONTENT -->
216+
213217
---
214218

215219
🔍 For more information, refer to the [API reference](https://pub.dev/documentation/df_log/).
@@ -236,6 +240,8 @@ No matter how you choose to contribute, your involvement is greatly appreciated
236240

237241
If you're enjoying this package and find it valuable, consider showing your appreciation with a small donation. Every bit helps in supporting future development. You can donate here: https://www.buymeacoffee.com/dev_cetera
238242

243+
<a href="https://www.buymeacoffee.com/dev_cetera" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" height="40"></a>
244+
239245
## LICENSE
240246

241247
This project is released under the [MIT License](https://raw.githubusercontent.com/dev-cetera/df_log/main/LICENSE). See [LICENSE](https://raw.githubusercontent.com/dev-cetera/df_log/main/LICENSE) for more information.

lib/src/log_item.dart

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ final class LogItem {
5757
required this.showTimestamp,
5858
required this.frame,
5959
required this.context,
60-
}) : id = const Uuid().v4(),
61-
timestamp = DateTime.now(),
62-
internalIndex = _internalCount++;
60+
}) : id = const Uuid().v4(),
61+
timestamp = DateTime.now(),
62+
internalIndex = _internalCount++;
6363

6464
//
6565
//
@@ -115,12 +115,10 @@ final class LogItem {
115115
final hasLocation = location1 != null && location1.isNotEmpty;
116116

117117
if (hasLocation) {
118-
final bracketStyle = nonMessageStyle != null
119-
? AnsiStyle.bold + nonMessageStyle
120-
: null;
121-
final pathTextStyle = nonMessageStyle != null
122-
? AnsiStyle.italic + nonMessageStyle
123-
: null;
118+
final bracketStyle =
119+
nonMessageStyle != null ? AnsiStyle.bold + nonMessageStyle : null;
120+
final pathTextStyle =
121+
nonMessageStyle != null ? AnsiStyle.italic + nonMessageStyle : null;
124122
if (icon != null) {
125123
buffer.write('$icon ');
126124
}
@@ -139,8 +137,8 @@ final class LogItem {
139137

140138
if (message != null) {
141139
final styledMessage = message.toString().trim().withAnsiStyle(
142-
messageStyle,
143-
);
140+
messageStyle,
141+
);
144142
buffer.write(styledMessage);
145143
}
146144

@@ -195,9 +193,8 @@ final class LogItem {
195193

196194
String toJson({bool pretty = true}) {
197195
final map = toMap();
198-
final encoder = pretty
199-
? const JsonEncoder.withIndent(' ')
200-
: const JsonEncoder();
196+
final encoder =
197+
pretty ? const JsonEncoder.withIndent(' ') : const JsonEncoder();
201198
return encoder.convert(map);
202199
}
203200

0 commit comments

Comments
 (0)