<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-error-log-table">
      </a>
      29.12.22.2 The error_log Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045067750272">
  </a>
  <a class="indexterm" name="idm46045067748784">
  </a>
  <p>
   Of the logs the MySQL server maintains, one is the error log
          to which it writes diagnostic messages (see
   <a class="xref" href="error-log.html" title="7.4.2 The Error Log">
    Section 7.4.2, “The Error Log”
   </a>
   ). Typically, the server writes
          diagnostics to a file on the server host or to a system log
          service. Depending on error log configuration, the server can
          also write the most recent error events to the Performance
          Schema
   <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
    <code class="literal">
     error_log
    </code>
   </a>
   table. Granting
          the
   <a class="link" href="privileges-provided.html#priv_select">
    <code class="literal">
     SELECT
    </code>
   </a>
   privilege for the
   <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
    <code class="literal">
     error_log
    </code>
   </a>
   table thus gives
          clients and applications access to error log contents using
          SQL queries, enabling DBAs to provide access to the log
          without the need to permit direct file system access on the
          server host.
  </p>
  <p>
   The
   <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
    <code class="literal">
     error_log
    </code>
   </a>
   table supports
          focused queries based on its more structured columns. It also
          includes the full text of error messages to support more
          free-form analysis.
  </p>
  <p>
   The table implementation uses a fixed-size, in-memory ring
          buffer, with old events automatically discarded as necessary
          to make room for new ones.
  </p>
  <p>
   Example
   <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
    <code class="literal">
     error_log
    </code>
   </a>
   contents:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa86299236"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>error_log\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
    LOGGED<span class="token punctuation">:</span> 2020-08-06 09<span class="token punctuation">:</span>25<span class="token punctuation">:</span>00.338624
 THREAD_ID<span class="token punctuation">:</span> 0
      PRIO<span class="token punctuation">:</span> System
ERROR_CODE<span class="token punctuation">:</span> MY-010116
 SUBSYSTEM<span class="token punctuation">:</span> Server
      DATA<span class="token punctuation">:</span> mysqld (mysqld 8.4.3) starting as process 96344
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 2. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
    LOGGED<span class="token punctuation">:</span> 2020-08-06 09<span class="token punctuation">:</span>25<span class="token punctuation">:</span>00.363521
 THREAD_ID<span class="token punctuation">:</span> 1
      PRIO<span class="token punctuation">:</span> System
ERROR_CODE<span class="token punctuation">:</span> MY-013576
 SUBSYSTEM<span class="token punctuation">:</span> InnoDB
      DATA<span class="token punctuation">:</span> InnoDB initialization has started.
...
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 65. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
    LOGGED<span class="token punctuation">:</span> 2020-08-06 09<span class="token punctuation">:</span>25<span class="token punctuation">:</span>02.936146
 THREAD_ID<span class="token punctuation">:</span> 0
      PRIO<span class="token punctuation">:</span> Warning
ERROR_CODE<span class="token punctuation">:</span> MY-010068
 SUBSYSTEM<span class="token punctuation">:</span> Server
      DATA<span class="token punctuation">:</span> CA certificate /var/mysql/sslinfo/cacert.pem is self signed.
...
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 89. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
    LOGGED<span class="token punctuation">:</span> 2020-08-06 09<span class="token punctuation">:</span>25<span class="token punctuation">:</span>03.112801
 THREAD_ID<span class="token punctuation">:</span> 0
      PRIO<span class="token punctuation">:</span> System
ERROR_CODE<span class="token punctuation">:</span> MY-013292
 SUBSYSTEM<span class="token punctuation">:</span> Server
      DATA<span class="token punctuation">:</span> Admin interface ready for connections, address<span class="token punctuation">:</span> '127.0.0.1' port<span class="token punctuation">:</span> 33062</span></code></pre>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
    <code class="literal">
     error_log
    </code>
   </a>
   table has the
          following columns. As indicated in the descriptions, all but
          the
   <code class="literal">
    DATA
   </code>
   column correspond to fields of the
          underlying error event structure, which is described in
   <a class="xref" href="error-log-event-fields.html" title="7.4.2.3 Error Event Fields">
    Section 7.4.2.3, “Error Event Fields”
   </a>
   .
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       LOGGED
      </code>
     </p>
     <p>
      The event timestamp, with microsecond precision.
      <code class="literal">
       LOGGED
      </code>
      corresponds to the
      <code class="literal">
       time
      </code>
      field of error events, although
              with certain potential differences:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         <code class="literal">
          time
         </code>
         values in the error log are
                  displayed according to the
         <a class="link" href="server-system-variables.html#sysvar_log_timestamps">
          <code class="literal">
           log_timestamps
          </code>
         </a>
         system
                  variable setting; see
         <a class="xref" href="error-log-format.html#error-log-format-output-format-for-early-logging" title="Early-Startup Logging Output Format">
          Early-Startup Logging Output Format
         </a>
         .
        </p>
       </li>
       <li class="listitem">
        <p>
         The
         <code class="literal">
          LOGGED
         </code>
         column stores values
                  using the
         <a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
          <code class="literal">
           TIMESTAMP
          </code>
         </a>
         data type, for which values are stored in UTC but
                  displayed when retrieved in the current session time
                  zone; see
         <a class="xref" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
          Section 13.2.2, “The DATE, DATETIME, and TIMESTAMP Types”
         </a>
         .
        </p>
       </li>
      </ul>
     </div>
     <p>
      To display
      <code class="literal">
       LOGGED
      </code>
      values in the same
              time zone as displayed in the error log file, first set
              the session time zone as follows:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa40231358"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> <span class="token variable">@@session.time_zone</span> <span class="token operator">=</span> <span class="token variable">@@global.log_timestamps</span><span class="token punctuation">;</span></code></pre>
     </div>
     <p>
      If the
      <a class="link" href="server-system-variables.html#sysvar_log_timestamps">
       <code class="literal">
        log_timestamps
       </code>
      </a>
      value is
      <code class="literal">
       UTC
      </code>
      and your system does not
              have named time zone support installed (see
      <a class="xref" href="time-zone-support.html" title="7.1.15 MySQL Server Time Zone Support">
       Section 7.1.15, “MySQL Server Time Zone Support”
      </a>
      ), set the time zone
              like this:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa8453771"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> <span class="token variable">@@session.time_zone</span> <span class="token operator">=</span> <span class="token string">'+00:00'</span><span class="token punctuation">;</span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       THREAD_ID
      </code>
     </p>
     <p>
      The MySQL thread ID.
      <code class="literal">
       THREAD_ID
      </code>
      corresponds to the
      <code class="literal">
       thread
      </code>
      field of
              error events.
     </p>
     <p>
      Within the Performance Schema, the
      <code class="literal">
       THREAD_ID
      </code>
      column in the
      <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
       <code class="literal">
        error_log
       </code>
      </a>
      table is most
              similar to the
      <code class="literal">
       PROCESSLIST_ID
      </code>
      column of
              the
      <a class="link" href="performance-schema-threads-table.html" title="29.12.22.8 The threads Table">
       <code class="literal">
        threads
       </code>
      </a>
      table:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         For foreground threads,
         <code class="literal">
          THREAD_ID
         </code>
         and
         <code class="literal">
          PROCESSLIST_ID
         </code>
         represent a
                  connection identifier. This is the same value
                  displayed in the
         <code class="literal">
          ID
         </code>
         column of the
         <code class="literal">
          INFORMATION_SCHEMA
         </code>
         <a class="link" href="information-schema-processlist-table.html" title="28.3.23 The INFORMATION_SCHEMA PROCESSLIST Table">
          <code class="literal">
           PROCESSLIST
          </code>
         </a>
         table,
                  displayed in the
         <code class="literal">
          Id
         </code>
         column of
         <a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
          <code class="literal">
           SHOW PROCESSLIST
          </code>
         </a>
         output, and returned by the
         <a class="link" href="information-functions.html#function_connection-id">
          <code class="literal">
           CONNECTION_ID()
          </code>
         </a>
         function within the thread.
        </p>
       </li>
       <li class="listitem">
        <p>
         For background threads,
         <code class="literal">
          THREAD_ID
         </code>
         is 0 and
         <code class="literal">
          PROCESSLIST_ID
         </code>
         is
         <code class="literal">
          NULL
         </code>
         .
        </p>
       </li>
      </ul>
     </div>
     <p>
      Many Performance Schema tables other than
      <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
       <code class="literal">
        error_log
       </code>
      </a>
      has a column named
      <code class="literal">
       THREAD_ID
      </code>
      , but in those tables, the
      <code class="literal">
       THREAD_ID
      </code>
      column is a value assigned
              internally by the Performance Schema.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       PRIO
      </code>
     </p>
     <p>
      The event priority. Permitted values are
      <code class="literal">
       System
      </code>
      ,
      <code class="literal">
       Error
      </code>
      ,
      <code class="literal">
       Warning
      </code>
      ,
      <code class="literal">
       Note
      </code>
      . The
      <code class="literal">
       PRIO
      </code>
      column is based on the
      <code class="literal">
       label
      </code>
      field of error events, which
              itself is based on the underlying numeric
      <code class="literal">
       prio
      </code>
      field value.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ERROR_CODE
      </code>
     </p>
     <p>
      The numeric event error code.
      <code class="literal">
       ERROR_CODE
      </code>
      corresponds to the
      <code class="literal">
       error_code
      </code>
      field of error events.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       SUBSYSTEM
      </code>
     </p>
     <p>
      The subsystem in which the event occurred.
      <code class="literal">
       SUBSYSTEM
      </code>
      corresponds to the
      <code class="literal">
       subsystem
      </code>
      field of error events.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       DATA
      </code>
     </p>
     <p>
      The text representation of the error event. The format of
              this value depends on the format produced by the log sink
              component that generates the
      <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
       <code class="literal">
        error_log
       </code>
      </a>
      row. For example,
              if the log sink is
      <code class="literal">
       log_sink_internal
      </code>
      or
      <code class="literal">
       log_sink_json
      </code>
      ,
      <code class="literal">
       DATA
      </code>
      values represent error events in traditional or JSON
              format, respectively. (See
      <a class="xref" href="error-log-format.html" title="7.4.2.9 Error Log Output Format">
       Section 7.4.2.9, “Error Log Output Format”
      </a>
      .)
     </p>
     <p>
      Because the error log can be reconfigured to change the
              log sink component that supplies rows to the
      <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
       <code class="literal">
        error_log
       </code>
      </a>
      table, and because
              different sinks produce different output formats, it is
              possible for rows written to the
      <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
       <code class="literal">
        error_log
       </code>
      </a>
      table at different
              times to have different
      <code class="literal">
       DATA
      </code>
      formats.
     </p>
    </li>
   </ul>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
    <code class="literal">
     error_log
    </code>
   </a>
   table has these
          indexes:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Primary key on (
      <code class="literal">
       LOGGED
      </code>
      )
     </p>
    </li>
    <li class="listitem">
     <p>
      Index on (
      <code class="literal">
       THREAD_ID
      </code>
      )
     </p>
    </li>
    <li class="listitem">
     <p>
      Index on (
      <code class="literal">
       PRIO
      </code>
      )
     </p>
    </li>
    <li class="listitem">
     <p>
      Index on (
      <code class="literal">
       ERROR_CODE
      </code>
      )
     </p>
    </li>
    <li class="listitem">
     <p>
      Index on (
      <code class="literal">
       SUBSYSTEM
      </code>
      )
     </p>
    </li>
   </ul>
  </div>
  <p>
   <a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
    <code class="literal">
     TRUNCATE TABLE
    </code>
   </a>
   is not permitted
          for the
   <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
    <code class="literal">
     error_log
    </code>
   </a>
   table.
  </p>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="performance-schema-error-log-table-implementation">
       </a>
       Implementation and Configuration of the error_log Table
      </h5>
     </div>
    </div>
   </div>
   <p>
    The Performance Schema
    <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
     <code class="literal">
      error_log
     </code>
    </a>
    table is populated by
            error log sink components that write to the table in
            addition to writing formatted error events to the error log.
            Performance Schema support by log sinks has two parts:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       A log sink can write new error events to the
       <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
        <code class="literal">
         error_log
        </code>
       </a>
       table as they
                occur.
      </p>
     </li>
     <li class="listitem">
      <p>
       A log sink can provide a parser for extraction of
                previously written error messages. This enables a server
                instance to read messages written to an error log file
                by the previous instance and store them in the
       <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
        <code class="literal">
         error_log
        </code>
       </a>
       table. Messages
                written during shutdown by the previous instance may be
                useful for diagnosing why shutdown occurred.
      </p>
     </li>
    </ul>
   </div>
   <p>
    Currently, the traditional-format
    <code class="literal">
     log_sink_internal
    </code>
    and JSON-format
    <code class="literal">
     log_sink_json
    </code>
    sinks support writing new
            events to the
    <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
     <code class="literal">
      error_log
     </code>
    </a>
    table
            and provide a parser for reading previously written error
            log files.
   </p>
   <p>
    The
    <a class="link" href="server-system-variables.html#sysvar_log_error_services">
     <code class="literal">
      log_error_services
     </code>
    </a>
    system variable controls which log components to enable for
            error logging. Its value is a pipeline of log filter and log
            sink components to be executed in left-to-right order when
            error events occur. The
    <a class="link" href="server-system-variables.html#sysvar_log_error_services">
     <code class="literal">
      log_error_services
     </code>
    </a>
    value
            pertains to populating the
    <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
     <code class="literal">
      error_log
     </code>
    </a>
    table as follows:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       At startup, the server examines the
       <a class="link" href="server-system-variables.html#sysvar_log_error_services">
        <code class="literal">
         log_error_services
        </code>
       </a>
       value and chooses from it the leftmost log sink that
                satisfies these conditions:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          A sink that supports the
          <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
           <code class="literal">
            error_log
           </code>
          </a>
          table and
                    provides a parser.
         </p>
        </li>
        <li class="listitem">
         <p>
          If none, a sink that supports the
          <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
           <code class="literal">
            error_log
           </code>
          </a>
          table but
                    provides no parser.
         </p>
        </li>
       </ul>
      </div>
      <p>
       If no log sink satisfies those conditions, the
       <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
        <code class="literal">
         error_log
        </code>
       </a>
       table remains
                empty. Otherwise, if the sink provides a parser and log
                configuration enables a previously written error log
                file to be found, the server uses the sink parser to
                read the last part of the file and writes the old events
                it contains to the table. The sink then writes new error
                events to the table as they occur.
      </p>
     </li>
     <li class="listitem">
      <p>
       At runtime, if the value of
       <a class="link" href="server-system-variables.html#sysvar_log_error_services">
        <code class="literal">
         log_error_services
        </code>
       </a>
       changes, the server again examines it, this time looking
                for the leftmost enabled log sink that supports the
       <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
        <code class="literal">
         error_log
        </code>
       </a>
       table, regardless
                of whether it provides a parser.
      </p>
      <p>
       If no such log sink exists, no additional error events
                are written to the
       <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
        <code class="literal">
         error_log
        </code>
       </a>
       table. Otherwise,
                the newly configured sink writes new error events to the
                table as they occur.
      </p>
     </li>
    </ul>
   </div>
   <p>
    Any configuration that affects output written to the error
            log affects
    <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
     <code class="literal">
      error_log
     </code>
    </a>
    table
            contents. This includes settings such as those for
            verbosity, message suppression, and message filtering. It
            also applies to information read at startup from a previous
            log file. For example, messages not written during a
            previous server instance configured with low verbosity do
            not become available if the file is read by a current
            instance configured with higher verbosity.
   </p>
   <p>
    The
    <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
     <code class="literal">
      error_log
     </code>
    </a>
    table is a view
            on a fixed-size, in-memory ring buffer, with old events
            automatically discarded as necessary to make room for new
            ones. As shown in the following table, several status
            variables provide information about ongoing
    <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
     <code class="literal">
      error_log
     </code>
    </a>
    operation.
   </p>
   <div class="informaltable">
    <table summary="error_log table status variables.">
     <colgroup>
      <col style="width: 35%"/>
      <col style="width: 35%"/>
     </colgroup>
     <thead>
      <tr>
       <th>
        Status Variable
       </th>
       <th>
        Meaning
       </th>
      </tr>
     </thead>
     <tbody>
      <tr>
       <td>
        <a class="link" href="server-status-variables.html#statvar_Error_log_buffered_bytes">
         <code class="literal">
          Error_log_buffered_bytes
         </code>
        </a>
       </td>
       <td>
        Bytes used in table
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="server-status-variables.html#statvar_Error_log_buffered_events">
         <code class="literal">
          Error_log_buffered_events
         </code>
        </a>
       </td>
       <td>
        Events present in table
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="server-status-variables.html#statvar_Error_log_expired_events">
         <code class="literal">
          Error_log_expired_events
         </code>
        </a>
       </td>
       <td>
        Events discarded from table
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="server-status-variables.html#statvar_Error_log_latest_write">
         <code class="literal">
          Error_log_latest_write
         </code>
        </a>
       </td>
       <td>
        Time of last write to table
       </td>
      </tr>
     </tbody>
    </table>
   </div>
  </div>
 </div>
 <br/>
</div>
