WriteData
HRESULT WriteData(path: [in] BSTR, value: [in] BSTR, append: [in] VARIANT_BOOL)
Description
Writes data to the log file. It is used for logs in JS code.
Please note, that for the
.docbuilder
file theCDocBuilder.WriteData
method is not used.
Parameters
- path
BSTR
- The path to the file where all the logs will be written.
- value
BSTR
- The data which will be written to the log file.
- append
VARIANT_BOOL
- Specifies if the new data will be appended to the already existing log file or a new file will be created.
Example
COM
CoInitialize(NULL);
IONLYOFFICEDocBuilder* oBuilder = NULL;
oBuilder->Initialize();
oBuilder->WriteData("result.log", "Alert!", false);
oBuilder->Dispose();