WriteData

void WriteData(sPath, sValue, bAppend);

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

NameTypeDescription
sPathconst wchar_t*The path to the file where all the logs will be written.
sValueconst wchar_t*The data which will be written to the log file.
bAppendconst bool&Specifies if the new data will be appended to the already existing log file or a new file will be created.

Example

C++

std::wstring sWorkDirectory = NSUtils::GetBuilderDirectory();
CDocBuilder::Initialize(sWorkDirectory.c_str());
CDocBuilder oBuilder;
oBuilder.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).