File tree Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ impl TaskResponder {
124
124
// prepare signed and encrypted payload
125
125
log:: info!(
126
126
"Publishing {} result for {}" ,
127
- "task" . green ( ) ,
127
+ "task" . yellow ( ) ,
128
128
task_output. task_id
129
129
) ;
130
130
let payload = TaskResponsePayload :: new (
Original file line number Diff line number Diff line change
1
+ use colored:: Colorize ;
1
2
use dkn_p2p:: libp2p:: request_response:: ResponseChannel ;
2
3
use dkn_workflows:: { Entry , ExecutionError , Executor , Workflow } ;
3
4
use libsecp256k1:: PublicKey ;
@@ -76,7 +77,7 @@ impl TaskWorker {
76
77
let task = self . task_rx . recv ( ) . await ;
77
78
78
79
if let Some ( task) = task {
79
- log:: info!( "Processing task {} (single)" , task. task_id) ;
80
+ log:: info!( "Processing {} {} (single)" , "task" . yellow ( ) , task. task_id) ;
80
81
TaskWorker :: execute ( ( task, & self . publish_tx ) ) . await
81
82
} else {
82
83
return self . shutdown ( ) ;
Original file line number Diff line number Diff line change 1
1
use eyre:: Result ;
2
2
use libp2p:: identity:: { Keypair , PublicKey } ;
3
- use libp2p:: { identify, request_response, PeerId , StreamProtocol } ;
3
+ use libp2p:: { identify, request_response, StreamProtocol } ;
4
4
use std:: time:: Duration ;
5
5
6
6
#[ derive( libp2p:: swarm:: NetworkBehaviour ) ]
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ impl DriaP2PClient {
288
288
..
289
289
} => {
290
290
log:: info!(
291
- "Connection (id: {connection_id}) established with peer {peer_id} ({} connections) at {:?}" ,
291
+ "Connection ({connection_id}) established with peer {peer_id} ({} connections) at {:?}" ,
292
292
num_established,
293
293
endpoint
294
294
) ;
@@ -302,9 +302,11 @@ impl DriaP2PClient {
302
302
cause,
303
303
} => {
304
304
log:: warn!(
305
- "Connection (id: {connection_id}) closed for {peer_id} ({} connections)\n Cause: {}" ,
305
+ "Connection ({connection_id}) closed for {peer_id} ({} connections)\n Cause: {}" ,
306
306
num_established,
307
- cause. map( |c| c. to_string( ) ) . unwrap_or( "Unknown" . to_string( ) )
307
+ cause
308
+ . map( |c| c. to_string( ) )
309
+ . unwrap_or( "Unknown" . to_string( ) )
308
310
) ;
309
311
310
312
if endpoint. is_dialer ( ) {
@@ -325,11 +327,11 @@ impl DriaP2PClient {
325
327
address,
326
328
listener_id,
327
329
} => {
328
- log:: warn!( "Listener {listener_id} expired: {address}" ) ;
330
+ log:: warn!( "Listener ( {listener_id}) expired: {address}" ) ;
329
331
}
330
332
331
333
SwarmEvent :: ListenerError { listener_id, error } => {
332
- log:: error!( "Listener {listener_id} error : {error}" ) ;
334
+ log:: error!( "Listener ( {listener_id}) failed : {error}" ) ;
333
335
}
334
336
335
337
event => log:: debug!( "Unhandled Swarm Event: {:?}" , event) ,
You can’t perform that action at this time.
0 commit comments