plugins/ctf/common/metadata: logging: standardize in parser and lexer
[babeltrace.git] / plugins / ctf / common / metadata / decoder.c
index c0cfa43850562073d160ceabfe00d626f6b6df7c..ddaeb02c41de577f26acda9380579c552f55c38d 100644 (file)
@@ -32,6 +32,9 @@
 
 #define TSDL_MAGIC     0x75d11d57
 
+BT_HIDDEN
+int yydebug;
+
 struct ctf_metadata_decoder {
        struct ctf_visitor_generate_ir *visitor;
        uint8_t uuid[16];
@@ -362,6 +365,10 @@ enum ctf_metadata_decoder_status ctf_metadata_decoder_decode(
                }
        }
 
+       if (BT_LOG_ON_VERBOSE) {
+               yydebug = 1;
+       }
+
        /* Allocate a scanner and append the metadata text content */
        scanner = ctf_scanner_alloc();
        if (!scanner) {
@@ -406,6 +413,8 @@ end:
                ctf_scanner_free(scanner);
        }
 
+       yydebug = 0;
+
        if (fp && close_fp) {
                if (fclose(fp)) {
                        BT_LOGE("Cannot close metadata file stream");
This page took 0.024381 seconds and 4 git commands to generate.