Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug statements break json format #760

Open
matteo-cristino opened this issue Nov 10, 2023 · 0 comments
Open

debug statements break json format #760

matteo-cristino opened this issue Nov 10, 2023 · 0 comments
Labels

Comments

@matteo-cristino
Copy link
Collaborator

The use of one of the following debug statements along with json output format, it will break that format:

and codec
and schema
and config

For example:

Given nothing

When I create the random 'random'
and schema
and codec
and config

Then print data

Will return

[ "ZENROOM JSON LOG START",
" Release version: v4.0.0",
" Build commit hash: 3d9733f1",
" Memory manager: mimalloc",
" ECDH curve is SECP256K1",
" ECP curve is BLS381",
"[W] Zencode is missing version check, please add: rule check version N.N.N",
"[W] �{
 SCHEMA = {
 a_GIVEN_in = {},
 c_CODEC_ack = {
 random = {
 encoding = "def",
 name = "random",
 zentype = "e"
 }
 },
 c_WHEN_ack = {
 random = octet[32]
 },
 d_THEN_out = {}
 }
}",
"[W] {
 CODEC = {
 random = {
 encoding = "def",
 name = "random",
 zentype = "e"
 }
 }
}",
"[W] �{
 code = {
 encoding = {
 fun = <function 1>
 }
 },
 debug = {
 encoding = {
 fun = <function 2>,
 name = "hex"
 },
 format = "compact"
 },
 hash = "sha256",
 heap = {
 check_collision = true
 },
 heapguard = true,
 input = {
 encoding = {
 check = <function 3>,
 encoding = "base64",
 fun = <function 4>
 },
 format = {
 fun = <function 5>,
 name = "json"
 },
 tagged = false
 },
 output = {
 encoding = {
 fun = <function 6>,
 name = "base64"
 },
 format = {
 fun = <function 5>,
 name = "json"
 },
 versioning = false
 },
 parser = {
 strict_match = true
 }
}",
" Zenroom execution completed.",
"[*] Zenroom teardown.",
" Memory used: 407 KB",
"ZENROOM JSON LOG END" ]
@jaromil jaromil added the bug label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants