Skip to content

Commit

Permalink
logging improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaphasilor committed Dec 11, 2024
1 parent bfa9027 commit 6feb157
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/components/global_snackbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class GlobalSnackbar {
/// Show an unlocalized error message to the user
static void error(dynamic event) => _enqueue(() => _error(event));
static void _error(dynamic event) {
_logger.warning("Displaying error: $event");
_logger.warning("Displaying error: $event", event);
if (event is Error && event.stackTrace != null) {
_logger.warning(event.stackTrace);
}
Expand Down
6 changes: 5 additions & 1 deletion lib/services/queue_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,12 @@ class QueueService {
source: source,
order: order,
initialIndex: startingIndex);
_queueServiceLogger.info(
"Started playing '${GlobalSnackbar.materialAppScaffoldKey.currentContext != null ? source.name.getLocalized(GlobalSnackbar.materialAppScaffoldKey.currentContext!) : source.name.type}' (${source.type}) in order $order from index $startingIndex");
_queueServiceLogger
.info("Started playing '${source.name}' (${source.type})");
.info("Items for queue: ${items.map((e) => e.name).join(", ")}");
_queueServiceLogger
.info("Items for queue: ${items.map((e) => e.name).join(", ")}");
}

/// Replaces the queue with the given list of items. If startAtIndex is specified, Any items below it
Expand Down

0 comments on commit 6feb157

Please sign in to comment.