<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="error-log-components">
      </a>
      7.5.3 Error Log Components
     </h3>
    </div>
   </div>
  </div>
  <p>
   This section describes the characteristics of individual error log
      components. For general information about configuring error
      logging, see
   <a class="xref" href="error-log.html" title="7.4.2 The Error Log">
    Section 7.4.2, “The Error Log”
   </a>
   .
  </p>
  <p>
   A log component can be a filter or a sink:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      A filter processes log events, to add, remove, or modify event
          fields, or to delete events entirely. The resulting events
          pass to the next log component in the list of enabled
          components.
     </p>
    </li>
    <li class="listitem">
     <p>
      A sink is a destination (writer) for log events. Typically, a
          sink processes log events into log messages that have a
          particular format and writes these messages to its associated
          output, such as a file or the system log. A sink may also
          write 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; see
      <a class="xref" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
       Section 29.12.22.2, “The error_log Table”
      </a>
      . Events
          pass unmodified to the next log component in the list of
          enabled components (that is, although a sink formats events to
          produce output messages, it does not modify events as they
          pass internally to the next component).
     </p>
    </li>
   </ul>
  </div>
  <p>
   The
   <a class="link" href="server-system-variables.html#sysvar_log_error_services">
    <code class="literal">
     log_error_services
    </code>
   </a>
   system
      variable lists the enabled log components. Components not named in
      the list are disabled.
   <a class="link" href="server-system-variables.html#sysvar_log_error_services">
    <code class="literal">
     log_error_services
    </code>
   </a>
   also
      implicitly loads error log components if they are not already
      loaded. For more information, see
   <a class="xref" href="error-log-configuration.html" title="7.4.2.1 Error Log Configuration">
    Section 7.4.2.1, “Error Log Configuration”
   </a>
   .
  </p>
  <p>
   The following sections describe individual log components, grouped
      by component type:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="xref" href="error-log-components.html#error-log-filter-components" title="Filter Error Log Components">
       Filter Error Log Components
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="error-log-components.html#error-log-sink-components" title="Sink Error Log Components">
       Sink Error Log Components
      </a>
     </p>
    </li>
   </ul>
  </div>
  <p>
   Component descriptions include these types of information:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      The component name and intended purpose.
     </p>
    </li>
    <li class="listitem">
     <p>
      Whether the component is built in or must be loaded. For a
          loadable component, the description specifies the URN to use
          if explicitly loading or unloading the component with the
      <a class="link" href="install-component.html" title="15.7.4.3 INSTALL COMPONENT Statement">
       <code class="literal">
        INSTALL COMPONENT
       </code>
      </a>
      and
      <a class="link" href="uninstall-component.html" title="15.7.4.5 UNINSTALL COMPONENT Statement">
       <code class="literal">
        UNINSTALL COMPONENT
       </code>
      </a>
      statements.
          Implicitly loading error log components requires only the
          component name. For more information, see
      <a class="xref" href="error-log-configuration.html" title="7.4.2.1 Error Log Configuration">
       Section 7.4.2.1, “Error Log Configuration”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      Whether the component can be listed multiple times in the
      <a class="link" href="server-system-variables.html#sysvar_log_error_services">
       <code class="literal">
        log_error_services
       </code>
      </a>
      value.
     </p>
    </li>
    <li class="listitem">
     <p>
      For a sink component, the destination to which the component
          writes output.
     </p>
    </li>
    <li class="listitem">
     <p>
      For a sink component, whether it supports an interface 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.
     </p>
    </li>
   </ul>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="error-log-filter-components">
       </a>
       Filter Error Log Components
      </h4>
     </div>
    </div>
   </div>
   <p>
    Error log filter components implement filtering of error log
        events. If no filter component is enabled, no filtering occurs.
   </p>
   <p>
    Any enabled filter component affects log events only for
        components listed later in the
    <a class="link" href="server-system-variables.html#sysvar_log_error_services">
     <code class="literal">
      log_error_services
     </code>
    </a>
    value. In
        particular, for any log sink component listed in
    <a class="link" href="server-system-variables.html#sysvar_log_error_services">
     <code class="literal">
      log_error_services
     </code>
    </a>
    earlier than
        any filter component, no log event filtering occurs.
   </p>
   <h5>
    <a name="idm46045257269152">
    </a>
    The log_filter_internal Component
   </h5>
   <a class="indexterm" name="idm46045257268480">
   </a>
   <a class="indexterm" name="idm46045257267392">
   </a>
   <a class="indexterm" name="idm46045257265904">
   </a>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       Purpose: Implements filtering based on log event priority
            and error code, in combination with the
       <a class="link" href="server-system-variables.html#sysvar_log_error_verbosity">
        <code class="literal">
         log_error_verbosity
        </code>
       </a>
       and
       <a class="link" href="server-system-variables.html#sysvar_log_error_suppression_list">
        <code class="literal">
         log_error_suppression_list
        </code>
       </a>
       system variables. See
       <a class="xref" href="error-log-priority-based-filtering.html" title="7.4.2.5 Priority-Based Error Log Filtering (log_filter_internal)">
        Section 7.4.2.5, “Priority-Based Error Log Filtering (log_filter_internal)”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       URN: This component is built in and need not be loaded.
      </p>
     </li>
     <li class="listitem">
      <p>
       Multiple uses permitted: No.
      </p>
     </li>
    </ul>
   </div>
   <p>
    If
    <code class="literal">
     log_filter_internal
    </code>
    is disabled,
    <a class="link" href="server-system-variables.html#sysvar_log_error_verbosity">
     <code class="literal">
      log_error_verbosity
     </code>
    </a>
    and
    <a class="link" href="server-system-variables.html#sysvar_log_error_suppression_list">
     <code class="literal">
      log_error_suppression_list
     </code>
    </a>
    have
        no effect.
   </p>
   <h5>
    <a name="idm46045257254448">
    </a>
    The log_filter_dragnet Component
   </h5>
   <a class="indexterm" name="idm46045257253728">
   </a>
   <a class="indexterm" name="idm46045257252640">
   </a>
   <a class="indexterm" name="idm46045257251152">
   </a>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       Purpose: Implements filtering based on the rules defined by
            the
       <a class="link" href="server-system-variables.html#sysvar_dragnet.log_error_filter_rules">
        <code class="literal">
         dragnet.log_error_filter_rules
        </code>
       </a>
       system variable setting. See
       <a class="xref" href="error-log-rule-based-filtering.html" title="7.4.2.6 Rule-Based Error Log Filtering (log_filter_dragnet)">
        Section 7.4.2.6, “Rule-Based Error Log Filtering (log_filter_dragnet)”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       URN:
       <code class="literal">
        file://component_log_filter_dragnet
       </code>
      </p>
     </li>
     <li class="listitem">
      <p>
       Multiple uses permitted: No.
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="error-log-sink-components">
       </a>
       Sink Error Log Components
      </h4>
     </div>
    </div>
   </div>
   <p>
    Error log sink components are writers that implement error log
        output. If no sink component is enabled, no log output occurs.
   </p>
   <p>
    Some sink component descriptions refer to the default error log
        destination. This is the console or a file and is indicated by
        the value of the
    <a class="link" href="server-system-variables.html#sysvar_log_error">
     <code class="literal">
      log_error
     </code>
    </a>
    system variable, determined as described in
    <a class="xref" href="error-log-destination-configuration.html" title="7.4.2.2 Default Error Log Destination Configuration">
     Section 7.4.2.2, “Default Error Log Destination Configuration”
    </a>
    .
   </p>
   <h5>
    <a name="idm46045257239616">
    </a>
    The log_sink_internal Component
   </h5>
   <a class="indexterm" name="idm46045257238944">
   </a>
   <a class="indexterm" name="idm46045257237856">
   </a>
   <a class="indexterm" name="idm46045257236368">
   </a>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       Purpose: Implements traditional error log message output
            format.
      </p>
     </li>
     <li class="listitem">
      <p>
       URN: This component is built in and need not be loaded.
      </p>
     </li>
     <li class="listitem">
      <p>
       Multiple uses permitted: No.
      </p>
     </li>
     <li class="listitem">
      <p>
       Output destination: Writes to the default error log
            destination.
      </p>
     </li>
     <li class="listitem">
      <p>
       Performance Schema support: Writes 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. Provides a
            parser for reading error log files created by previous
            server instances.
      </p>
     </li>
    </ul>
   </div>
   <h5>
    <a name="idm46045257228768">
    </a>
    The log_sink_json Component
   </h5>
   <a class="indexterm" name="idm46045257228096">
   </a>
   <a class="indexterm" name="idm46045257227008">
   </a>
   <a class="indexterm" name="idm46045257225520">
   </a>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       Purpose: Implements JSON-format error logging. See
       <a class="xref" href="error-log-json.html" title="7.4.2.7 Error Logging in JSON Format">
        Section 7.4.2.7, “Error Logging in JSON Format”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       URN:
       <code class="literal">
        file://component_log_sink_json
       </code>
      </p>
     </li>
     <li class="listitem">
      <p>
       Multiple uses permitted: Yes.
      </p>
     </li>
     <li class="listitem">
      <p>
       Output destination: This sink determines its output
            destination based on the default error log destination,
            which is given by the
       <a class="link" href="server-system-variables.html#sysvar_log_error">
        <code class="literal">
         log_error
        </code>
       </a>
       system variable:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          If
          <a class="link" href="server-system-variables.html#sysvar_log_error">
           <code class="literal">
            log_error
           </code>
          </a>
          names a
                file, the sink bases output file naming on that file
                name, plus a numbered
          <code class="filename">
           .
           <em class="replaceable">
            <code>
             NN
            </code>
           </em>
           .json
          </code>
          suffix, with
          <em class="replaceable">
           <code>
            NN
           </code>
          </em>
          starting at
                00. For example, if
          <a class="link" href="server-system-variables.html#sysvar_log_error">
           <code class="literal">
            log_error
           </code>
          </a>
          is
          <em class="replaceable">
           <code>
            file_name
           </code>
          </em>
          , successive
                instances of
          <code class="literal">
           log_sink_json
          </code>
          named in
                the
          <a class="link" href="server-system-variables.html#sysvar_log_error_services">
           <code class="literal">
            log_error_services
           </code>
          </a>
          value write to
          <code class="filename">
           <em class="replaceable">
            <code>
             file_name
            </code>
           </em>
           .00.json
          </code>
          ,
          <code class="filename">
           <em class="replaceable">
            <code>
             file_name
            </code>
           </em>
           .01.json
          </code>
          ,
                and so forth.
         </p>
        </li>
        <li class="listitem">
         <p>
          If
          <a class="link" href="server-system-variables.html#sysvar_log_error">
           <code class="literal">
            log_error
           </code>
          </a>
          is
          <code class="literal">
           stderr
          </code>
          , the sink writes to the
                console. If
          <code class="literal">
           log_sink_json
          </code>
          is named
                multiple times in the
          <a class="link" href="server-system-variables.html#sysvar_log_error_services">
           <code class="literal">
            log_error_services
           </code>
          </a>
          value, they all write to the console, which is likely
                not useful.
         </p>
        </li>
       </ul>
      </div>
     </li>
     <li class="listitem">
      <p>
       Performance Schema support: Writes 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. Provides a
            parser for reading error log files created by previous
            server instances.
      </p>
     </li>
    </ul>
   </div>
   <h5>
    <a name="idm46045257200480">
    </a>
    The log_sink_syseventlog Component
   </h5>
   <a class="indexterm" name="idm46045257199808">
   </a>
   <a class="indexterm" name="idm46045257198720">
   </a>
   <a class="indexterm" name="idm46045257197232">
   </a>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       Purpose: Implements error logging to the system log. This is
            the Event Log on Windows, and
       <code class="literal">
        syslog
       </code>
       on
            Unix and Unix-like systems. See
       <a class="xref" href="error-log-syslog.html" title="7.4.2.8 Error Logging to the System Log">
        Section 7.4.2.8, “Error Logging to the System Log”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       URN:
       <code class="literal">
        file://component_log_sink_syseventlog
       </code>
      </p>
     </li>
     <li class="listitem">
      <p>
       Multiple uses permitted: No.
      </p>
     </li>
     <li class="listitem">
      <p>
       Output destination: Writes to the system log. Does not use
            the default error log destination.
      </p>
     </li>
     <li class="listitem">
      <p>
       Performance Schema support: Does not write 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. Does not
            provide a parser for reading error log files created by
            previous server instances.
      </p>
     </li>
    </ul>
   </div>
   <h5>
    <a name="idm46045257187472">
    </a>
    The log_sink_test Component
   </h5>
   <a class="indexterm" name="idm46045257186800">
   </a>
   <a class="indexterm" name="idm46045257185712">
   </a>
   <a class="indexterm" name="idm46045257184224">
   </a>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       Purpose: Intended for internal use in writing test cases,
            not for production use.
      </p>
     </li>
     <li class="listitem">
      <p>
       URN:
       <code class="literal">
        file://component_log_sink_test
       </code>
      </p>
     </li>
    </ul>
   </div>
   <p>
    Sink properties such as whether multiple uses are permitted and
        the output destination are not specified for
    <code class="literal">
     log_sink_test
    </code>
    because, as mentioned, it is
        for internal use. As such, its behavior is subject to change at
        any time.
   </p>
  </div>
 </div>
 <br/>
</div>
