> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WriteToLog

> Call WriteToLog in the ABBYY FlexiCapture API to record a set of LogRecord events in the Application Server log, with client time for accurate timestamps.

## What it does

Writes event data into the log on the Application Server.

## Definition

```
void WriteToLog( long clientTime, LogRecord [] records );
```

## Parameters

<table width="100%"><tbody><tr><td><p><strong>Name</strong></p></td><td><p><strong>Type</strong></p></td><td><p><strong>Description</strong></p></td></tr><tr><td><p>clientTime</p></td><td><p>long</p></td><td><p>The data and time when the event occurred on the workstation. Use the following methods to convert the data (C#):</p><pre><code>DateTime dtTime;
long lTime;
…
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
…
// conversion from long to DateTime
lTime = dTime.ToFileTime();</code></pre></td></tr><tr><td><p>records</p></td><td><p><a href="/flexi-capture/api/structures/log-record">LogRecord</a>\[]</p></td><td><p>A set of records, each describing one of the events to be written in the log on the Application Server</p></td></tr></tbody></table>

<Note>
  Using both the **clientTime** and **LogRecord.time** parameters is needed for the following reasons:
</Note>

* Call of the LogRecord\[] method can be deferred.
* Local time on the client computer and the time on the server may differ. This error can be corrected if you know the local time on the client computer at the moment when the LogRecord\[] method was called.

## Returned value

None.
