You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2021/11/01 20:36:00 UTC

[jira] [Created] (DAFFODIL-2575) dfdlx:trace function should not write directly to stderr

Steve Lawrence created DAFFODIL-2575:
----------------------------------------

             Summary: dfdlx:trace function should not write directly to stderr
                 Key: DAFFODIL-2575
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2575
             Project: Daffodil
          Issue Type: Bug
          Components: Back End
            Reporter: Steve Lawrence


There's little restrictions about what the {{dfdlx:trace}} function should do. The fn:trace function, which this is based on, says:

bq. In addition, the values of $value, converted to an xs:string, and $label (if supplied) may be directed to a trace data set. The destination of the trace output is ·implementation-defined·. The format of the trace output is ·implementation-dependent·. The ordering of output from calls of the fn:trace function is ·implementation-dependent·. 
bq. 

So we have output trace data however we think makes the most sense.

We currently output to stderr, but that could be difficult for some users of Daffodil (e.g. debugger, API users, etc.) to capture. Instead, we should just log the data using our logger. Since our logging uses the Log4J API, it should be relatively easy for tools to capture and display trace information.

Note that CLI logging goes to stderr by default, so this is functionally no change for the CLI, except maybe with an added [info] or [debug] tag depending on what level we decide trace should be log to.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)