Skip to main content

Apache Access Logs for Sanic

Project description

# Sanic Apache Access Logs

Sanic Plugin to log access logs in common or combined format

## How to use

from sanic import Sanic
from sanic.response import json
from sanic_apache_accesslogs import AccessLogPlugin

app = Sanic(__name__, configure_logging=False)


@app.route('/', methods=['GET'])
async def hello(request):
return json({'hello': 'world'})

if __name__ == '__main__':'localhost', port=5000, access_log=False)

## Common or Combined?

For choosing the format set the environment variable `ACCESSLOG_USE_COMBINED` to choose combined over common.

## TODO(s)

* Use Sanic configuration context to choose between the logging format.

## Contact

Arnulfo Solis

Release history Release notifications

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sanic_apache_accesslogs, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size sanic_apache_accesslogs-0.2.1.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page