Open ghost opened 1 year ago
tempDocumentMainPart can be a quite big xml file, which not fits "Users level" messages constraint.
My point of view is that allowing to provide an external logManager object that can provide any debug information for the tool that use PHPWord would have sense.
I just added my own while debugging the splitted Macros problem, which looks like class TemplateProcessor { ... /**
And then can be used this way
$log_obj = $this->logModel;
if(null !== $log_obj){
$log_obj->dumpDataToLog(
Then a list of usefull content can be defined.
Note that i added this cause i let users create custom words files that have to be used as templates -)
That's a fantastic solution!!
Tks Tim -)
Note i also had the same problem, for example when trying to debug Image Reading.
And so i added also this kind of solution using AbstractReader, AbstractPart and AbstractElement object.
I will try to make a branch soon for this kind of solution, but i'm interested in any return that could make it more efficient/easy to use.
As a developer, I'd like to be able to have a hint of where problems arise when generating or manipulating a Word document.
We're all developers here, wouldn't it be nice to toss in the $search variable into the error message? This would also be a nice to have for parse errors of DOM/HTML as well. It just throws an error, but doesn't give you any clue where the problem might be.
Maybe if I get some time, I'll create a PR for this.