Skip to content

Commit 976e570

Browse files
ci: bump version to v0.3.21
1 parent 7b16863 commit 976e570

File tree

4 files changed

+35
-12
lines changed

4 files changed

+35
-12
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [0.3.21]
4+
5+
- Released @ 7/2025 (UTC)
6+
- Update readme
7+
38
## [0.3.20]
49

510
- Released @ 7/2025 (UTC)

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ Dart & Flutter Packages by dev-cetera.com & contributors.
66
[![sponsor](https://img.shields.io/badge/sponsor-grey?logo=github-sponsors)](https://github.com/sponsors/dev-cetera)
77
[![patreon](https://img.shields.io/badge/patreon-grey?logo=patreon)](https://www.patreon.com/c/RobertMollentze)
88
[![pub](https://img.shields.io/pub/v/df_log.svg)](https://pub.dev/packages/df_log)
9-
[![tag](https://img.shields.io/badge/tag-v0.3.20-purple?logo=github)](https://github.com/dev-cetera/df_log/tree/v0.3.20)
9+
[![tag](https://img.shields.io/badge/tag-v0.3.21-purple?logo=github)](https://github.com/dev-cetera/df_log/tree/v0.3.21)
1010
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/dev-cetera/df_log/main/LICENSE)
1111

1212
---
1313

14-
[![banner](https://github.com/dev-cetera/df_log/blob/v0.3.20/doc/assets/banner.png?raw=true)](https://github.com/dev-cetera)
14+
[![banner](https://github.com/dev-cetera/df_safer_dart/blob/v0.3.21/doc/assets/banner.png?raw=true)](https://github.com/dev-cetera)
1515

1616
<!-- BEGIN _README_CONTENT -->
1717

18-
A package that provides a simple, powerful, and beautiful logging utility for better debugging in Dart and Flutter.
18+
`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.
1919

2020
## Features
2121

@@ -32,6 +32,15 @@ A package that provides a simple, powerful, and beautiful logging utility for be
3232

3333
<img src="https://raw.githubusercontent.com/dev-cetera/df_log/main/example/example.png" alt="Example image" width="400">
3434

35+
## 🚀 Getting Started
36+
37+
For an introduction, please refer to this article:
38+
39+
- **MEDIUM.COM** [Dart Logging: Your New Best Friend](https://medium.com/@dev-cetera/dart-logging-your-new-best-friend-7e0dbd701dc7)
40+
- **DEV.TO** [Dart Logging: Your New Best Friend](https://dev.to/dev_cetera/dart-logging-your-new-best-friebd-ae1)
41+
- **GITHUB** [Dart Logging: Your New Best Friend](https://github.com/dev-cetera/df_log/blob/main/ARTICLE.md)
42+
43+
3544
## Usage
3645

3746
### 1. Categorized Logs

lib/src/log.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,8 @@ final class Log {
554554
}
555555

556556
// Only print if combinedTags is empty or any of combinedTags are in activeTags.
557-
if (combinedTags.isNotEmpty && !activeTags.any((e) => combinedTags.contains(e))) {
557+
if (combinedTags.isNotEmpty &&
558+
!activeTags.any((e) => combinedTags.contains(e))) {
558559
return;
559560
}
560561

lib/src/log_item.dart

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ final class LogItem {
4848
required this.showTags,
4949
required this.showTimestamp,
5050
required this.frame,
51-
}) : id = const Uuid().v4(),
52-
timestamp = DateTime.now();
51+
}) : id = const Uuid().v4(),
52+
timestamp = DateTime.now();
5353

5454
//
5555
//
@@ -102,8 +102,12 @@ final class LogItem {
102102
final hasLocation = location1 != null && location1.isNotEmpty;
103103

104104
if (hasLocation) {
105-
final bracketStyle = nonMessageStyle != null ? AnsiStyle.bold + nonMessageStyle : null;
106-
final pathTextStyle = nonMessageStyle != null ? AnsiStyle.italic + nonMessageStyle : null;
105+
final bracketStyle = nonMessageStyle != null
106+
? AnsiStyle.bold + nonMessageStyle
107+
: null;
108+
final pathTextStyle = nonMessageStyle != null
109+
? AnsiStyle.italic + nonMessageStyle
110+
: null;
107111
if (icon != null) {
108112
buffer.write('$icon ');
109113
}
@@ -120,8 +124,8 @@ final class LogItem {
120124

121125
if (message != null) {
122126
final styledMessage = message.toString().trim().withAnsiStyle(
123-
messageStyle,
124-
);
127+
messageStyle,
128+
);
125129
buffer.write(styledMessage);
126130
}
127131

@@ -149,7 +153,9 @@ final class LogItem {
149153
final uri = frame?.uri.toString();
150154

151155
return {
152-
'icon': icon != null && (location != null && location!.isNotEmpty) ? icon : null,
156+
'icon': icon != null && (location != null && location!.isNotEmpty)
157+
? icon
158+
: null,
153159
'location': location != null && location!.isNotEmpty ? location : null,
154160
'message': () {
155161
try {
@@ -175,7 +181,9 @@ final class LogItem {
175181

176182
String toJson({bool pretty = true}) {
177183
final map = toMap();
178-
final encoder = pretty ? const JsonEncoder.withIndent(' ') : const JsonEncoder();
184+
final encoder = pretty
185+
? const JsonEncoder.withIndent(' ')
186+
: const JsonEncoder();
179187
return encoder.convert(map);
180188
}
181189

0 commit comments

Comments
 (0)