t_ using it enhances the listening experience.
		 */
		break;
	case MIDI_CTL_PITCHBEND:
		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_pitch);
		break;
	}
}

void snd_opl4_sysex(void *private_data, unsigned char *buf, int len,
		    int parsed, struct snd_midi_channel_set *chset)
{
	struct snd_opl4 *opl4 = private_data;

	if (parsed == SNDRV_MIDI_SYSEX_GS_MASTER_VOLUME)
		snd_opl4_do_for_all(opl4, snd_opl4_update_volume);
}


.. _access-logging:

==============
Access Logging
==============

The WSGI design is modular.  Waitress logs error conditions, debugging
output, etc., but not web traffic.  For web traffic logging, Paste
provides `TransLogger
<https://web.archive.org/web/20160707041338/http://pythonpaste.org/modules/translogger.html>`_
:term:`middleware`.  TransLogger produces logs in the `Apache Combined
Log Format <https://httpd.apache.org/docs/current/logs.html#combined>`_.


.. _logging-to-the-console-using-python:

Logging to the Console Using Python
-----------------------------------

``waitress.serve`` calls ``logging.basicConfig()`` to set up logging to the
console when the server starts up.  Assuming no other logging configuration
has already been done, this sets the logging default level to
``logging.WARNING``.  The Waitress logger will inherit the root logger's
level information (it logs at level ``WARNING`` or above).

Waitress sends its logging output (including application exception
renderings) to the Python logger object named ``waitress``.  You can
influence the logger level and output stream using the normal Python
``logging`` module API.  For example:

.. code-block:: python

   import logging
   logger = logging.getLogger('waitress')
   logger.setLevel(logging.INFO)

Within a PasteDeploy configuration file, you can use the normal Python
``logging`` module ``.ini`` file format to change similar Waitress logging
options.  For example:

.. code-block:: ini

   [logger_waitress]
   level = INFO


.. _logging-to-the-console-using-pastedeploy:

Logging to the Console Using PasteDeploy
-