hdalsania commented on issue #116:
URL: 
https://github.com/apache/daffodil-vscode/issues/116#issuecomment-5169666753

   > To clarify, although they have very similar names, the `dfdlx:trace()` 
function is unrelated to the daffodil CLI debugger `--trace` output in the 
above screen shot.
   > 
   > The purpose of `dfdlx:trace()` is to output information when Daffodil 
evaluates a DFDL expression. More information is here:
   > 
   > https://daffodil.apache.org/dfdl-extensions/#dfdlxtracevalue-label
   > 
   > As an example, you could have a schema like this:
   > 
   > <element name="foo" type="xs:int"
   >   dfdl:inputValueCalc="{ dfdlx:trace(../bar * 10, 'calculated value of 
foo') }" />
   > If this example, when the `foo` inputValueCalc is evaluated on parse, 
Daffodil will log something like below (assuming the value of the parsed `bar` 
element is 2) :
   > 
   > ```
   > dfdlx:trace caluculated value of foo : 20
   > ```
   > 
   > Note that this happens regardless the CLI `--trace` is used or not. If 
this function is called in an expression, then the message will be logged.
   > 
   > Daffodil writes this string to the configured logger at the `info` log 
level. Note that older versions of Daffodil used Log4j, modern versions of 
Daffodil use scala-logging, which is essentially a wrapper that supports a 
number of logging backends.
   > 
   > So in order to capture these logs, you might need to set up a logger, or 
maybe you might need to configure the log level so info messages are captured. 
Or maybe is already captured and something just needs to be enabled to make it 
visible in VS Code.
   
   This definitely helps. Thanks, Steve!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to