networkapi.extra_logging package

Submodules

networkapi.extra_logging.filters module

class networkapi.extra_logging.filters.ExtraLoggingFilter(name='')[source]

Bases: logging.Filter

filter(record)[source]

Determine if the specified record is to be logged.

Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.

class networkapi.extra_logging.filters.RequestFilter(name='')[source]

Bases: logging.Filter

Python logging filter that removes the (non-pickable) Django request object from the logging record.

filter(record)[source]

Determine if the specified record is to be logged.

Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.

class networkapi.extra_logging.filters.StaticFieldFilter(fields)[source]

Bases: logging.Filter

Python logging filter that adds the given static contextual information in the fields dictionary to all logging records.

filter(record)[source]

Determine if the specified record is to be logged.

Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.

class networkapi.extra_logging.filters.UserFilter(name='')[source]

Bases: logging.Filter

filter(record)[source]

Determine if the specified record is to be logged.

Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.

networkapi.extra_logging.middleware module

class networkapi.extra_logging.middleware.ExtraLoggingMiddleware[source]

Bases: object

process_exception(request, exception)[source]
process_request(request)[source]
process_response(request, response)[source]
networkapi.extra_logging.middleware.get_context(request)[source]
networkapi.extra_logging.middleware.get_identity(request)[source]
networkapi.extra_logging.middleware.get_username(request)[source]

Module contents