writeData

void writeData(path: String, value: String, append: boolean)

Description

Writes data to the log file. It is used for logs in JS code.

Please note, that for the .docbuilder file the CDocBuilder.writeData method is not used.

Parameters

pathString
The path to the file where all the logs will be written.
valueString
The data which will be written to the log file.
appendboolean
Specifies if the new data will be appended to the already existing log file or a new file will be created.

Example

Java

CDocBuilder.initialize("");
CDocBuilder builder = new CDocBuilder();
builder.writeData("result.log", "Alert!", false);
CDocBuilder.dispose();

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).