'Write to the access log (in Apache/NCSA Combined Log format).
See the
`apache documentation <http://httpd.apache.org/docs/current/logs.html#combined>`_
for format details.
CherryPy calls this automatically for you. Note there are no arguments;
it collects the data itself from
:class:`cherrypy.request<cherrypy._cprequest.Request>`.
Like Apache started doing in 2.0.46, non-printable and other special
characters in %r (and we expand that to all parts) are escaped using
\xhh sequences, where hh stands for the hexadecimal representation
of the raw byte. Exceptions from this rule are " and \, which are
escaped by prepending a backslash, and all whitespace characters,
which are written in their C-style notation (\n, \t, etc).'

def access(self):

    request = cherrypy.serving.request
    remote = request.remote
    response = cherrypy.serving.response
    outheaders = response.headers
    inheaders = request.headers
    if (response.output_status is None):
        status = '-'
    else:
        status = response.output_status.split(ntob('    '), 1)[0]
        if py3k:
            status = status.decode('ISO-8859-1')
    atoms = {'h': (remote.name or remote.ip), 'l': '-', 'u': (getattr(request, 'login', None) or '-'), 't': self.time(), 'r': request.request_line, 's': status, 'b': (dict.get(outheaders, 'Content-Length', '') or '-'), 'f': dict.get(inheaders, 'Referer', ''), 'a': dict.get(inheaders, 'User-Agent', ''), 'o': dict.get(inheaders, 'Host', '-')}
    if py3k:
        for (k, v) in atoms.items():
            if (not isinstance(v, str)):
                v = str(v)
            v = v.replace('"', '\\"').encode('utf8')
            v = repr(v)[2:(-1)]
            v = v.replace('\\\\', '\\')
            atoms[k] = v
        try:
            self.access_log.log(logging.INFO, self.access_log_format.format(**atoms))
        except:
            self(traceback=True)
    else:
        for (k, v) in atoms.items():
            if isinstance(v, unicode):
                v = v.encode('utf8')
            elif (not isinstance(v, str)):
                v = str(v)
            v = repr(v)[1:(-1)]
            atoms[k] = v.replace('"', '\\"')
        try:
            self.access_log.log(logging.INFO, (self.access_log_format % atoms))
        except:
            self(traceback=True)
