-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add
AsyncFutureBeaconLogger
[feenkcom/gtoolkit#3778]
- Loading branch information
1 parent
38f2bdd
commit 55032de
Showing
5 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/GToolkit-Extensions/AsyncFutureCompositeLogger.extension.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Extension { #name : #AsyncFutureCompositeLogger } | ||
|
||
{ #category : #'*GToolkit-Extensions' } | ||
AsyncFutureCompositeLogger >> gtLoggersFor: aView [ | ||
<gtView> | ||
^ aView columnedList | ||
title: 'Loggers'; | ||
items: [ self loggers ]; | ||
column: 'Name' text: #yourself | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Class { | ||
#name : #AsyncFutureBeaconLogger, | ||
#superclass : #Object, | ||
#traits : 'TAsyncFutureLogger', | ||
#classTraits : 'TAsyncFutureLogger classTrait', | ||
#category : #'GToolkit-Monitor-Future Workers' | ||
} | ||
|
||
{ #category : #logging } | ||
AsyncFutureBeaconLogger >> pendingTask: aPendingTask [ | ||
AsyncFuturePendingTaskSignal new | ||
pendingTask: aPendingTask; | ||
emit | ||
] |
37 changes: 37 additions & 0 deletions
37
src/GToolkit-Monitor/AsyncFuturePendingTaskSignal.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Class { | ||
#name : #AsyncFuturePendingTaskSignal, | ||
#superclass : #AsyncFutureSignal, | ||
#instVars : [ | ||
'pendingTask' | ||
], | ||
#category : #'GToolkit-Monitor-Future Workers' | ||
} | ||
|
||
{ #category : #accessing } | ||
AsyncFuturePendingTaskSignal >> gtCompositionFor: aView [ | ||
<gtView> | ||
^ aView forward | ||
title: 'Pending task'; | ||
object: [ self pendingTask ]; | ||
view: #gtCompositionFor: | ||
] | ||
|
||
{ #category : #accessing } | ||
AsyncFuturePendingTaskSignal >> pendingTask [ | ||
<return: #AsyncFutureThreadPoolPendingTask> | ||
^ pendingTask | ||
] | ||
|
||
{ #category : #accessing } | ||
AsyncFuturePendingTaskSignal >> pendingTask: aTask [ | ||
pendingTask := aTask | ||
] | ||
|
||
{ #category : #accessing } | ||
AsyncFuturePendingTaskSignal >> printOneLineContentsOn: stream [ | ||
pendingTask ifNil: [ ^ self ]. | ||
timestamp ifNil: [ ^ self ]. | ||
|
||
stream nextPutAll: 'After '. | ||
(timestamp - pendingTask sinceTime) printHumanReadableOn: stream | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Class { | ||
#name : #AsyncFutureSignal, | ||
#superclass : #BeaconSignal, | ||
#category : #'GToolkit-Monitor-Future Workers' | ||
} |