X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=examples%2Fping_xapp.py;fp=examples%2Fping_xapp.py;h=aafebb8ad8bd7b7aa3aa2c555f62218df65f2ed4;hb=0f8305b167601ce6ca87c55208038455a65eab62;hp=145dd5b60d7c8922607aa8910d7a2f0514e5aa28;hpb=5b582d6c144615002b5108f1d5cf94f1b70e6029;p=ric-plt%2Fxapp-frame-py.git diff --git a/examples/ping_xapp.py b/examples/ping_xapp.py index 145dd5b..aafebb8 100644 --- a/examples/ping_xapp.py +++ b/examples/ping_xapp.py @@ -41,12 +41,16 @@ def entry(self): # store it in SDL and read it back; delete and read self.sdl_set(my_ns, "numba", number) - print((self.sdl_get(my_ns, "numba"), self.sdl_find_and_get(my_ns, "num"))) + self.logger.info(self.sdl_get(my_ns, "numba")) + self.logger.info(self.sdl_find_and_get(my_ns, "num")) self.sdl_delete(my_ns, "numba") - print(self.sdl_get(my_ns, "numba")) + self.logger.info(self.sdl_get(my_ns, "numba")) # rmr receive for (summary, sbuf) in self.rmr_get_messages(): + # summary is a dict that contains bytes so we can't use json.dumps on it so we have no good way to turn this into a string to use the logger unfortunately + # print is more "verbose" than the ric logger + # if you try to log this you will get: TypeError: Object of type bytes is not JSON serializable print(summary) self.rmr_free(sbuf)