Page MenuHomeClusterLabs Projects

Log warnings if 3.0.0 XSLs cannot preserve behavior
Open, HighPublic

Assigned To
Authored By
kgaillot
Oct 14 2024, 12:27 PM
Tags
  • Restricted Project
  • Restricted Project
  • Restricted Project
  • Restricted Project
Referenced Files
None
Subscribers

Description

For XSL transformations that do not exactly preserve the previous behavior (for example, dropping support for deprecated resource types), we should log a warning. XSL has some mechanism for this, and we already have an appropriate logger in C.

See also:

Event Timeline

kgaillot created this task.
kgaillot created this object with edit policy "Restricted Project (Project)".
kgaillot edited projects, added Restricted Project, Restricted Project, Restricted Project; removed Restricted Project.Oct 14 2024, 12:36 PM
kgaillot moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
kgaillot moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Thu, Nov 14, 2:36 PM

XSL has some mechanism for this, and we already have an appropriate logger in C.

Logging a warning via XSL (using xsl:message) looks straightforward. I presume libxslt will send it to stderr... It's not obvious how we'd tell the C caller to log a message, or what it should log. Maybe we could do some before-and-after checking of the CIB XML, but that doesn't seem worth the computational cost or added code complexity.

In T896#14685, @nrwahl2 wrote:

XSL has some mechanism for this, and we already have an appropriate logger in C.

Logging a warning via XSL (using xsl:message) looks straightforward. I presume libxslt will send it to stderr... It's not obvious how we'd tell the C caller to log a message, or what it should log. Maybe we could do some before-and-after checking of the CIB XML, but that doesn't seem worth the computational cost or added code complexity.

libxslt allows us to set an error handler via xsltSetGenericErrorFunc() so we can send messages to stderr, the log, or an output object as appropriate (we don't currently have output objects used everywhere they should be, but that's a project in progress)