# C1.Document.C1DocumentSource.AddToLog

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Document_C1DocumentSource_AddToLog_" data-uid="C1.Document.C1DocumentSource.AddToLog*">AddToLog Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Document_C1DocumentSource_AddToLog_" data-uid="C1.Document.C1DocumentSource.AddToLog*"></a>
<h4 id="C1_Document_C1DocumentSource_AddToLog_System_Exception_" data-uid="C1.Document.C1DocumentSource.AddToLog(System.Exception)">AddToLog(Exception)</h4>
<div class="markdown level1 summary"><p>Adds log entry to the <a class="xref" href="C1.Document.C1DocumentSource.Log.html#C1_Document_C1DocumentSource_Log">Log</a> list.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LogEntry AddToLog(Exception ex)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddToLog(ex As Exception) As LogEntry</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a></td>
      <td><span class="parametername">ex</span></td>
      <td><p>The exception associated with log entry.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Document.LogEntry.html">LogEntry</a></td>
      <td><p>The created <a class="xref" href="C1.Document.LogEntry.html">LogEntry</a> object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Document_C1DocumentSource_AddToLog_" data-uid="C1.Document.C1DocumentSource.AddToLog*"></a>
<h4 id="C1_Document_C1DocumentSource_AddToLog_C1_Document_LogEntrySeverity_System_String_" data-uid="C1.Document.C1DocumentSource.AddToLog(C1.Document.LogEntrySeverity,System.String)">AddToLog(LogEntrySeverity, string)</h4>
<div class="markdown level1 summary"><p>Adds log entry to the <a class="xref" href="C1.Document.C1DocumentSource.Log.html#C1_Document_C1DocumentSource_Log">Log</a> list.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LogEntry AddToLog(LogEntrySeverity severity, string message)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddToLog(severity As LogEntrySeverity, message As String) As LogEntry</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Document.LogEntrySeverity.html">LogEntrySeverity</a></td>
      <td><span class="parametername">severity</span></td>
      <td><p>The severity of the log entry.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">message</span></td>
      <td><p>The message of the log entry.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Document.LogEntry.html">LogEntry</a></td>
      <td><p>The created <a class="xref" href="C1.Document.LogEntry.html">LogEntry</a> object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Document_C1DocumentSource_AddToLog_" data-uid="C1.Document.C1DocumentSource.AddToLog*"></a>
<h4 id="C1_Document_C1DocumentSource_AddToLog_C1_Document_LogEntrySeverity_System_String_System_Object___" data-uid="C1.Document.C1DocumentSource.AddToLog(C1.Document.LogEntrySeverity,System.String,System.Object[])">AddToLog(LogEntrySeverity, string, params object[])</h4>
<div class="markdown level1 summary"><p>Adds log entry to the <a class="xref" href="C1.Document.C1DocumentSource.Log.html#C1_Document_C1DocumentSource_Log">Log</a> list.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public LogEntry AddToLog(LogEntrySeverity severity, string format, params object[] args)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddToLog(severity As LogEntrySeverity, format As String, ParamArray args As Object()) As LogEntry</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Document.LogEntrySeverity.html">LogEntrySeverity</a></td>
      <td><span class="parametername">severity</span></td>
      <td><p>The severity of the log entry.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">format</span></td>
      <td><p>The format string used to build message of the log entry.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</td>
      <td><span class="parametername">args</span></td>
      <td><p>The arguments used to build message of the log entry.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Document.LogEntry.html">LogEntry</a></td>
      <td><p>The created <a class="xref" href="C1.Document.LogEntry.html">LogEntry</a> object.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
