Commit 551e24a 1 parent ed6d34a commit 551e24a Copy full SHA for 551e24a
File tree 6 files changed +15
-3
lines changed
6 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -513,6 +513,10 @@ where
513
513
514
514
Ok ( ( ) )
515
515
}
516
+
517
+ fn log ( & mut self , msg : String ) {
518
+ self . trace ( ExecutionEvent :: Log ( msg) )
519
+ }
516
520
}
517
521
518
522
impl < M > DefaultCallManager < M >
Original file line number Diff line number Diff line change @@ -174,6 +174,9 @@ pub trait CallManager: 'static {
174
174
175
175
/// Appends an event to the event accumulator.
176
176
fn append_event ( & mut self , evt : StampedEvent ) ;
177
+
178
+ /// log
179
+ fn log ( & mut self , msg : String ) ;
177
180
}
178
181
179
182
/// The result of calling actor's entrypoint
Original file line number Diff line number Diff line change @@ -951,8 +951,8 @@ impl<C> DebugOps for DefaultKernel<C>
951
951
where
952
952
C : CallManager ,
953
953
{
954
- fn log ( & self , msg : String ) {
955
- println ! ( "{}" , msg)
954
+ fn log ( & mut self , msg : String ) {
955
+ self . call_manager . log ( msg)
956
956
}
957
957
958
958
fn debug_enabled ( & self ) -> bool {
Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ pub trait RandomnessOps {
285
285
#[ delegatable_trait]
286
286
pub trait DebugOps {
287
287
/// Log a message.
288
- fn log ( & self , msg : String ) ;
288
+ fn log ( & mut self , msg : String ) ;
289
289
290
290
/// Returns whether debug mode is enabled.
291
291
fn debug_enabled ( & self ) -> bool ;
Original file line number Diff line number Diff line change @@ -38,4 +38,5 @@ pub enum ExecutionEvent {
38
38
id : ActorID ,
39
39
state : ActorState ,
40
40
} ,
41
+ Log ( String ) ,
41
42
}
Original file line number Diff line number Diff line change @@ -404,4 +404,8 @@ impl CallManager for DummyCallManager {
404
404
) -> fvm:: kernel:: Result < ( ) > {
405
405
todo ! ( )
406
406
}
407
+
408
+ fn log ( & mut self , _msg : String ) {
409
+ todo ! ( )
410
+ }
407
411
}
You can’t perform that action at this time.
0 commit comments