dita-ot / dita-ot/dita-ot

Running DITA-OT via the API does not write in debug log file

Open
#4,535 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
455
Forks
211
Avg merge
1d 11h
Merged PRs (30d)
3

Description

## Expected Behavior

Running DITA-OT via the API the result of transformations should be written in a debug file created in a temporal directory.

This scenario happens from version `4.1.1` onwards.

## Actual Behavior

For success or failure scenarios running DITA-OT, it creates the debug file but at the end of the transformation it remains in zero bytes.

## Possible Solution

## Steps to Reproduce

1. Run DITA-OT via API.
```
Processor p = pf.newProcessor("html5")
.setInput(new File("/home/input/input.ditamap"))
.setOutputDir(new File("/home/output/"))
.setProperty("clean.temp", "no")
.setProperty("args.debug", "true")
.createDebugLog(true)
.cleanOnFailure(false)
.createDebugLog(true);

p.run();
```

**Result:**
Empty Log file created in temporal directory.
image

## Copy of the error message, log file or stack trace

No error messages.

## Environment

* DITA-OT version: `4.1.1` onwards
* Operating system and version: mac
_(Linux, macOS, Windows)_
* How did you run DITA-OT? JAVA - DITA API
_(`dita` command, Ant, `startcmd`, oXygen, other editor, CMS, etc.)_
* Transformation type: HTML5, PDF and custom.
_(HTML5, PDF, custom, etc.)_

Contributor guide

Open the contributing guide

Research direction

Start with the Java API flow using Processor, createDebugLog(true), and p.run(), then inspect how the debug log is created and written for DITA-OT 4.1.1 onwards. Reproduce the HTML5, PDF, or custom transformation on macOS with args.debug enabled and clean.temp disabled. Done means the temporal debug log contains the transformation result for both successful and failed runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.