You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2022/02/28 15:02:00 UTC

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

     [ https://issues.apache.org/jira/browse/DAFFODIL-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Thompson closed DAFFODIL-2575.
-----------------------------------

Verified the specified commit (commit 575a4c6ff9fcadb8eff733ba693b831de4156201) is included in the latest pull from the daffodil repository.

Verified changes identified in commit comments were implemented.

Verified affected daffodil sub-project sbt test suites executes successfully, including the added test.
 

> 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
>            Assignee: Alexander Revello
>            Priority: Minor
>              Labels: beginner
>             Fix For: 3.3.0
>
>
> 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.20.1#820001)