Skip to content

Commit

Permalink
fix: verbose logging listener
Browse files Browse the repository at this point in the history
  • Loading branch information
vanlooverenkoen committed Mar 9, 2024
1 parent 370b46b commit 2fd6136
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.13.6

## Fix

- Verbose logger listener steam already listened to

# 0.13.5

## Fix
Expand Down
3 changes: 2 additions & 1 deletion lib/src/core/util/input_listener/force_quit_listener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class ForceQuitListener {
_listeners.remove(listener);

static void init() {
_subscription = ProcessSignal.sigint.watch().listen((signal) async {
_subscription =
ProcessSignal.sigint.watch().asBroadcastStream().listen((signal) async {
if (_isShuttingDown) return;
_isShuttingDown = true;
ImpaktfullCliLogger.log('\nForce quit detected. Cleaning up...');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class VerboseLoggingListener {

static void startInputListener() {
_subscription?.cancel();
_subscription = stdin.listen((data) {
_subscription = stdin.asBroadcastStream().listen((data) {
final input = String.fromCharCodes(data).trim();

if (input.toLowerCase() == 'v' || input.toLowerCase() == 'verbose') {
Expand Down

0 comments on commit 2fd6136

Please sign in to comment.