> ## 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

> ABBYY FlexiCapture API で WriteToLog を呼び出すと、正確なタイムスタンプを付けるためのクライアント時刻とともに、一連の LogRecord イベントが Application Server のログに記録されます。

<div id="what-it-does">
  ## 動作
</div>

Application Server の ログ にイベントデータを書き込みます。

<div id="definition">
  ## 定義
</div>

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

<div id="parameters">
  ## パラメーター
</div>

<table width="100%"><tbody><tr><td><p><strong>名前</strong></p></td><td><p><strong>型</strong></p></td><td><p><strong>説明</strong></p></td></tr><tr><td><p>clientTime</p></td><td><p>long</p></td><td><p>ワークステーションでイベントが発生した日時です。データを変換するには、次のメソッドを使用します (C#) :</p><pre><code>DateTime dtTime;
long lTime;
…
// DateTime から long への変換
dTime = DateTime.FromFileTime(lTime);
…
// long から DateTime への変換
lTime = dTime.ToFileTime();</code></pre></td></tr><tr><td><p>records</p></td><td><p><a href="/ja/flexi-capture/api/structures/log-record">LogRecord</a>\[]</p></td><td><p>Application Server のログに書き込まれる各イベントを記述するレコードのセットです</p></td></tr></tbody></table>

<Note>
  次の理由により、**clientTime** と **LogRecord.time** の両方のパラメーターを使用する必要があります:
</Note>

* LogRecord\[] メソッドの呼び出しは遅れて実行される場合があります。
* クライアント コンピューターのローカル時刻とサーバー上の時刻は異なる可能性があります。LogRecord\[] メソッドが呼び出された時点のクライアント コンピューターのローカル時刻がわかっていれば、この誤差を補正できます。

<div id="returned-value">
  ## 戻り値
</div>

なし。
