Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bdb8a09

Browse files
MarkKoz64json
authored andcommitted
Implement LogTracer
1 parent 1894601 commit bdb8a09

File tree

1 file changed

+12
-2
lines changed
  • algorithm_visualizer/tracers

1 file changed

+12
-2
lines changed

algorithm_visualizer/tracers/log.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
from algorithm_visualizer import Tracer
1+
from algorithm_visualizer import Tracer, _Serializable
22

33
class LogTracer(Tracer):
4-
pass
4+
def set(self, log: _Serializable):
5+
self.command("set", log)
6+
7+
def print(self, message: _Serializable):
8+
self.command("print", message)
9+
10+
def println(self, message: _Serializable):
11+
self.command("println", message)
12+
13+
def printf(self, format: str, *args: _Serializable):
14+
self.command("printf", format, *args)

0 commit comments

Comments
 (0)